Sakurako and Old Dictionary
Sakurako is tidying the room. He has found a dictionary which contains strings. However, that dictionary is peculiar, and the presence of a string in the dictionary does not mean that such a word exists in reality.
Any word from Sakurako's world may be obtained by reordering the strings in the dictionary and concatenating them into one word. For example, if the dictionary contains the strings: , the possible words are: .
As the dictionary is a bit out of date, new words have appeared in the world. They can still be obtained from that dictionary if at most strings are reversed.
Help Sakurako find the lexicographically smallest possible word in modern life.
Input
The first line contains two integers — the number of words in the dictionary and the number of possible reversals.
Each of the following lines contains a string which belongs to the dictionary.
It is guaranteed that and all the strings consist of lowercase English letters.
Output
In a single line, output the lexicographically smallest word.
Examples
Scoring
( points): ;
( points): ;
( points): ;
( points): ;
( points): ;
( points): ;
( points): consists of letters and ;
( points): without additional restrictions.