K. Khoikhoi Dralinpome
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output
The Khoikhoi are a people from Southern Africa. Public Domain by Samuel Daniell on Wikmedia Commons

Despite being barred from speaking at the Boring Annual Palindrome Convention for being too progressive, your girlfriend Jeannetta has continued her research on dralinpomes. A dralinpome is, of course, a word in which the letters can be rearranged to form a palindrome. For example, khoikhoi is a dralinpome, because you can rearrange the letters to form the string khoiiohk, which is a palindrome, since it reads the same forwards and backwards.

Last year, Jeannetta found all the dralinpomes in the dictionary, but she's not satisfied yet. Luckily, she discovered that in Dutch, you can concatenate nouns to make a compound word. Even if it means setting a stand somewhere in a dark corner outside of the convention center, people have to hear her breakthrough talk How the Dutch Dominate Dralinpomes!

Unfortunately, Jeannetta is not quite satisfied with her talk. The longest dralinpome she could come up with was khoikhoihuttententoonstellingsbudgetbeheerder (treasurer for the famously long exposition of African housings), with only $$$45$$$ characters! She's fairly sure no one will show up to her talk without a longer example, so she has asked you to help.

Given a list of $$$n$$$ nouns, determine the longest dralinpome that can be formed by concatenating some of them. You may use each noun no more times than it is provided.

Input

The input consists of:

  • One line with an integer $$$n$$$ ($$$1\leq n\leq {32}$$$), the number of nouns.
  • $$$n$$$ lines, each with a string $$$w$$$ ($$$1 \leq |w| \leq {20}$$$), a noun. The nouns only consist of English lowercase letters (a-z).
Output

If it is possible to form a dralinpomic compound word, output "possible" followed by a longest possible such word. Otherwise, output "impossible".

If there are multiple valid solutions, you may output any one of them.

Examples
Input
2
multinomiaal
coefficient
Output
possible
multinomiaalcoefficient
Input
5
auto
band
ventiel
dopjes
fabriek
Output
impossible
Input
7
khoikhoi
soldaten
hutten
tentoonstellings
terreinen
budget
beheerder
Output
possible
khoikhoihuttententoonstellingsbudgetbeheerder
Input
3
ei
ei
ei
Output
possible
eiei