Lucy is studying coding algorithm , but she doesn't study well .
According to what she learned, she constructed a coding table for the character set with length

.
For example ,

, she constructed the coding table like this :

.
Then , she used the table to compress data .
For example :

.
But in some cases, her code will be ambiguous . Such as

can decoding as both ``ab'' or ``c'' .
Her physical education teacher found this problem and told her , but she didn't think so .
Now please help her physical education teacher find the minimum length of

string , which has at least two decoding methods .
输入描述:
The first line contains one integer
, indicates the size of character set .
Then
lines , the
line contains a
string
, represents the code of the
character .
The sum of
will not exceed
, for every pair
,
.
输出描述:
If the answer exists , print the answer , otherwise print
instead .