We are of one blood, you and I
– Hey, Mowgli! – called Baloo. – Tell Bagheera the Great Words of the Jungle that I taught you today.
– The Great Words of which people? – asked Mowgli, eager to demonstrate his knowledge. – ;There are many languages in the jungle, and I know them all.
– You don't know nearly all of them. Look, oh Bagheera, they never thank their teacher. No wolf cub ever returned to thank old Baloo for his lessons. Well, you, great scholar, say the Words of the People of the Hunters.
– We are of one blood, you and I, – said Mowgli, with the bear's accent, as all Hunters do.
– Good. Now the Great Words of the Birds.
Mowgli repeated the same phrase, ending it with the whistle of a kite.
– Now the Words of the snakes, – requested Bagheera.
In response, there was an indescribable hissing; then Mowgli kicked his feet, clapped his hands in self-appreciation, and leaped onto Bagheera's back.
– I can say a phrase that will be understood by all the peoples of the Jungle, – Mowgli began to boast.
But it turned out to be quite a challenging task…
Input
The first line contains the number of languages n (1 ≤ n ≤ 12) that Mowgli knows. Each of the following n lines contains a string, no longer than 50 characters – the Great Words in one of the Jungle languages. All words consist of uppercase Latin letters.
Output
Output the shortest string that contains all the given strings as substrings.