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;
typedef double db;
typedef long long ll;
//typedef pair<int, int> pii;
//#define fi first
//#define se second
#define lbd(a, x) lower_bound(all(a), x)
const int mod = 1e9 + 7;
const int M = 10100;
const int N = 2100;
struct pii {
	int fi, se;
	pii(int x=0, int y=0):fi(x),se(y) {}
};
bitset<M> ok[N];
char vs[N][M];
int len[N];
const int S = 15000;
pii q[2][S+N];
int t[2];
int main() {
#ifdef local
	freopen("in.txt", "r", stdin);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0), cout.tie(0);
	int n, k; cin >> n >> k;
	for(int i = 0; i < n; i++) {
		cin >> vs[i];
		len[i] = strlen(vs[i]);
	}
	ok[n][0] = 1;
	for(int i = n - 1; i; i--) {
		ok[i] = ok[i + 1] | (ok[i + 1] << len[i]);
	}
	int now = 0;
	for(int i = 0; i < n; i++) {
		if(ok[i + 1][k - len[i]]) {
			q[now][t[now]++] = pii(i, 0);
		}
	}
	string ans;
	for(int i = 0; i < k; i++) {
		now ^= 1;
		char z = 'z' + 1;
		for(int j = 0; j < t[now^1]; j++) {
			auto &e = q[now^1][j];
			z = min(z, vs[e.fi][e.se]);
		}
		ans.push_back(z);
		int zz = n;
		for(int j = 0; j < t[now^1]; j++) {
			auto &e = q[now^1][j];
			if(vs[e.fi][e.se] == z) {
				if(e.se == len[e.fi] - 1) {
					zz = min(zz, e.fi);
				} else {
					e.se++;
					q[now][t[now]++] = e;
				}
			}
		}
		int need = k - i - 1;
		for(int j = zz + 1; j < n && t[now] < S; j++)
			if(need >= len[j] && ok[j + 1][need - len[j]])
				q[now][t[now]++] = pii(j, 0);
		if(t[now] >= S) t[now] = S;
		t[now^1] = 0;
	}
	cout << ans << '\n';
	return 0;
}