Problem: Iroha has a sequence of N strings s_1, s_2, ..., s_N.

She will choose some (possibly all) strings from the sequence, then concatenate those strings retaining the relative order, to produce a long string.

Among all strings of length K that she can produce in this way, find the lexicographically smallest one.

Constraints

* 1 ≦ N ≦ 2000
* 1 ≦ K ≦ 10^4
* For each i, 1 ≦ |s_i| ≦ K.
* |s_1| + |s_2| + ... + |s_N| ≦ 10^6
* For each i, s_i consists of lowercase letters.
* There exists at least one string of length K that Iroha can produce.

Input

The input is given from Standard Input in the following format:


N K
s_1
s_2
:
s_N


Output

Print the lexicographically smallest string of length K that Iroha can produce.

Examples

Input

3 7
at
coder
codar


Output

atcodar


Input

3 7
coder
codar
at


Output

codarat


Input

4 13
kyuri
namida
zzzzzzz
aaaaaa


Output

namidazzzzzzz

Solution (in CPP):

Solution:
#include <bits/stdc++.h>

#define fir first
#define sec second
#define mp make_pair
#define For(i, j, k) for (int i = j; i <= k; ++ i)
#define Forr(i, j, k) for (int i = j; i >= k; -- i)

using namespace std;

inline void File() {
	freopen("F.in", "r", stdin);
	freopen("F.out", "w", stdout);
}

typedef pair<int, int> PII;

const int N = 2e3 + 10, M = 1e4 + 10, inf = 0x3f3f3f3f;
bitset<M> c[N]; PII a[2][N];
int n, k, len[N]; char s[N][M], ans[M];

int main() {
//	File();
	
	cin >> n >> k;
	For(i, 1, n) scanf("%s", s[i]), len[i] = strlen(s[i]);

	c[n + 1][0] = 1;
	Forr(i, n, 1) c[i] = c[i + 1] | (c[i + 1] << len[i]);

	int cnt = 0, tcnt = 0, t = 0;

	For(i, 1, n) if (c[i + 1][k - len[i]]) a[t][++ cnt] = mp(i, 0);

	for (int i = 0, mn; i < k; ++ i, cnt = tcnt, t ^= 1) {

		char mnc = 'z';
		For(j, 1, cnt) mnc = min(mnc, s[a[t][j].fir][a[t][j].sec]);
		ans[i] = mnc;	
				
		tcnt = 0, mn = inf;

		For(j, 1, cnt) {
			int ni = a[t][j].fir, ps = a[t][j].sec;
			if (s[ni][ps] != mnc) continue;
			if (ps == len[ni] - 1) mn = min(mn, ni);
			else a[t ^ 1][++ tcnt] = mp(ni, ps + 1);
		}

		if (mn ^ inf) For(j, mn + 1, n)
			if (k - len[j] - i - 1 >= 0 && c[j + 1][k - len[j] - i - 1]) a[t ^ 1][++ tcnt] = mp(j, 0);
	}

	For(i, 0, k - 1) putchar(ans[i]);

	return 0;
}