#abc225f. [abc225_f]String Cards
[abc225_f]String Cards
Problem Statement
We have cards. The -th card has a string written on it.
Find the lexicographically smallest string that can be obtained by choosing of these cards and concatenating them in any order.
Constraints
- consists of lowercase English letters.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
4 3
ode
zaaa
r
atc
Sample Output 1
atcoder
Note that it is not possible to reverse or permute the string written on a card.
For example, ode
written on the first card cannot be used as edo
or deo
.
Sample Input 2
5 2
z
z
zzz
z
zzzzzz
Sample Output 2
zz
There may be a pair such that .