Grouped Word#1597

Grouped Word

1 second
128 megabytes
Easy

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 different letters. 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.

Input

The input consists of multiple test cases. The first line of each test case contains the number (1 \leq n \leq 50) of word parts. The second line contains parts of the word in random order. The length of each part is no more than symbols 'a' – 'z'.

Output

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.

Examples

Example 1

Loading
Loading