You are given words. Find the shortest palindrome (a word that is the same with its reverse) containing all of them as contiguous substrings.
The first line contains an integer (1 \leq n \leq 14). The next lines contain one word each, between and characters long. All the characters are small English letters through .
Output the required palindrome. If there're several possible solutions, output any.
Example 1
Example 2