#abc042b. [abc042_b]Iroha Loves Strings (ABC Edition)
[abc042_b]Iroha Loves Strings (ABC Edition)
Problem Statement
Iroha has a sequence of strings . The length of each string is .
She will concatenate all of the strings in some order, to produce a long string.
Among all strings that she can produce in this way, find the lexicographically smallest one.
Here, a string ... is lexicographically smaller than another string ... if and only if one of the following holds:
- There exists an index , such that for all indices , and .
- for all integers , and .
Constraints
- For each , the length of equals .
- For each , consists of lowercase letters.
Input
The input is given from Standard Input in the following format:
:
Output
Print the lexicographically smallest string that Iroha can produce.
Sample Input 1
3 3
dxx
axx
cxx
Sample Output 1
axxcxxdxx
The following order should be used: axx
, cxx
, dxx
.