You bought a set of 26 wooden English alphabet blocks, one for each letter from A to Z. The blocks come in a long box in a single row, so laying them out reads like a 26 letter message.
You use N different passwords across your online accounts, and you are worried that one of them might show up in that message by accident. Decide whether the 26 letters can be arranged so that no password appears as a contiguous substring.
Input
The first line of the input contains the number of test cases T. Then T test cases follow. Each test case has two lines. The first line contains an integer N, and the second line contains N different strings of uppercase English letters P1, P2, ..., PN separated by spaces. These strings are the passwords.
Limits
1≤T≤100
1≤N≤50
1≤∣Pi∣≤26 for every i
Pi=Pj whenever i=j
Output
For each test case, print one line in the form Case #x: y, where x is the test case number starting from 1.
y is a permutation of the 26 letters A to Z that contains no password as a contiguous substring. When several permutations satisfy the condition, print the lexicographically smallest one. When no permutation satisfies it, print IMPOSSIBLE in place of y.