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>
using namespace std;

#define IL inline
IL int read() {
	char ch = getchar(); int u = 0, f = 1;
	while (!isdigit(ch)) { if (ch == '-') f = -1; ch = getchar(); }
	while (isdigit(ch)) { u = (u << 1) + (u << 3) + ch - 48; ch = getchar(); }
	return u * f; 
}

bitset<10050>dp[2010];
pair<int, int>F[2][10010];
string s[2010];
char ans[1000010];
int len[2010];
int main() {
#ifdef Edgration
	freopen("in", "r", stdin);
#endif
	int n = read(), k = read();
	for (int i = 1; i <= n; ++i) {
		cin >> s[i];
		len[i] = s[i].size();
	}
	dp[n + 1][0] = 1;
	for (int i = n; i >= 1; --i) dp[i] = dp[i + 1] | (dp[i + 1] << len[i]);
	int ll = 0;
	for (int i = 1; i <= n; ++i) if (dp[i + 1][k - len[i]]) F[0][++ll] = (make_pair(i, 0));
	int T = 0;
	for (int i = 0; i < k; ++i) {
		char minchar = 'z';
		for (int j = 1; j <= ll; ++j) minchar = min(minchar, s[F[T][j].first][F[T][j].second]);
		ans[i] = minchar;
		int minid = n + 1; int cur = 0;
		for (int j = 1; j <= ll; ++j) {
			int NowId = F[T][j].first; int NowLen = F[T][j].second;
			if (s[NowId][NowLen] != minchar) continue;
			if (NowLen + 1 == len[NowId]) minid = min(minid, NowId);
			else F[T ^ 1][++cur] = make_pair(NowId, NowLen + 1);
		}
		for (int j = minid + 1; j <= n; ++j) 
			if (k - len[j] - i - 1 >= 0 && dp[j + 1][k - len[j] - i - 1]) F[T ^ 1][++cur] = make_pair(j, 0);
		ll = cur;
		T ^= 1;
	}
	printf("%s", ans);
	return 0;
}