A word is grouped if, for each letter in the word, all occurrences of that letter form exactly one consecutive sequence. In other words, no two equal letters are separated by one or more letters that are different. For example, the words "ccazzzzbb" and "code" are grouped, while "aabbbccb" and "eolimpeolimp" are not.
A grouped word was divided into several parts. You are given all the parts in random order. Reconstruct the original word and print it.
Consists of multiple test cases. The first line of each test case contains the nuumber n (1 ≤ n ≤ 50) of word parts. The second line contains n parts of the word in random order. The length of each part is no more than 20 symbols 'a' - 'z'.
For each test case print in a separate line the original word. If there is more than one possible answer, print "MANY" instead. If no grouped word could have resulted in the given parts, print "IMPOSSIBLE" instead.
3 aaa a aa 2 ab bba 4 orr rd woo www 1 abcb
aaaaaa IMPOSSIBLE wwwwooorrrd IMPOSSIBLE