An alien language uses the Latin alphabet, but the order in which these characters appear in the dictionary is not clear.
You receive a list of $$$n$$$ lexicographically sorted string words from the dictionary i.e. the order in which these words appear in the list is the same as they would in the alien dictionary.
Output any valid order of letters in this language as a string. If there is no valid order, output "NO".
A string $$$a$$$ is lexicographically smaller than a string $$$b$$$ if either of the following is true:
The first line contains integer $$$n(1 \le n \le 100)$$$ — the number of words in the alien dictionary.
The next $$$n$$$ lines contain $$$n$$$ strings $$$s(1 \le |s| \le 100)$$$ — words in the alien dictionary in lexicographically sorted order.
Output any valid order of letters as a string; if no valid order exists, output "NO".
Input:
2 z o
Output:
zo
Input:
5 hrn hrf er enn rfnn
Output:
hernf