Recently, Bobo, having some free time, wants to write a poem. His method of writing poems is straightforward: he carefully selects

verses, where each verse is a binary string of length

and all

verses are distinct. He then considers
any concatenation of these

verses in any order to form a binary string of length

as a good poem.
Unfortunately, Bobo only has a broken typewriter. When Bobo tries to type

(where

is either

or

) on paper, the typewriter has a probability

(

) of typing

correctly and a probability

of typing

. Bobo wants to know, using the optimal strategy, what is the maximum probability that he can write a good poem?
输入描述:
The first line of input contains three integers
(
), which represent the number of verses, the length of each verse, and the probability that the typewriter works correctly, respectively. The probability
is guaranteed to have at most six decimal places.
Then
lines follow, with the
-th line
containing a binary string of length
, representing the content of the
-th verse. It is guaranteed that the
verses are distinct.
输出描述:
Output a single number in a line, representing the maximum probability that Bobo can write a good poem using the optimal strategy. Your answer will be considered correct if and only if its absolute or relative error does not exceed
. Formally, if the correct answer is
and your output is
, then your answer will be considered correct if and only if
.