Consider a set of symbols \{1, 2, \ldots, n\}. Each symbol is associated with a vector b_i of s and s. Any sequence of these symbols, c = c_1 c_2 \ldots c_k, defines a vector of s and s formed by concatenating b_{c_1}, b_{c_2}, \ldots, b_{c_k}; denote this as . Find the shortest vector consisting of s and s such that X = B(c) and X = B(d) for two distinct ordered sequences and . If there are several such sequences, output the lexicographically smallest one. It is guaranteed that at least one such sequence exists.
The first line contains a single integer (2 \leq N \leq 20). The next lines each contain a vector b_i, each of length at most .
Output the length of the found sequence in the first line. Output the sequence itself in the second line.
Example 1