#d11407. 抽卡

抽卡

Gacha

Problem Source

Click here

Problem Description

There are nn cards, each with a string sis_i on it. Now you must select kk of these cards so that, among all selection schemes, concatenating the kk cards gives a string with the lexicographically smallest value (see samples for details).

Input Format

The first line contains two integers n,kn, k (1≤k≤n≤501 \le k \le n \le 50).

The next nn lines each contain a string sis_i (1≤∣si∣≤501 \le |s_i| \le 50).

Output Format

Output one string: the lexicographically smallest string among all schemes that select kk cards.

Sample Input 1

4 3
ode
zaaa
r
atc

Sample Output 1

atcoder

Sample Input 2

5 2
z
z
zzz
z
zzzzzz

Sample Output 2

zz