The Tiv Tribe
Every year, Professor Ivanov travels to Africa to study the tribes living there. This year, he visited the Tiv tribe. The professor quickly learned to understand their language and studied many of their rituals, but he struggled to comprehend the numbers written in Tiv numerals. Like us, the tribe members use a positional number system with base 10. However, the digits in the Tiv tribe are represented by symbols that do not resemble the usual digits from 0 to 9.
The professor labeled these symbols with letters from 'a' to 'j', but he cannot determine which symbol corresponds to which digit. Then the tribe leader provided him with a list of n non-negative numbers, written without leading zeros, and mentioned that the numbers are sorted in strictly increasing order. Help the professor establish any correspondence between the symbols and the digits based on this list.
Input
The first line of the input file contains a single natural number n (2 ≤ n ≤ 10) — the number of words in the list. The next n lines contain the numbers given by the tribe leader, one number per line. The length of each number does not exceed 9.
Output
In the first line of the file, output "Yes" if a solution exists; in this case, output the digits corresponding to the symbols labeled 'a'..'j' in this order on the next line. If there are multiple solutions, output any one of them.
If the professor misunderstood something and no solution exists, output "No".