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 all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define lbd(a, x) lower_bound(all(a), x)
const int mod = 1e9 + 7;
const int M = 10010;
template<typename T>
vector<int> z_function(const T&s, int n) {
	vector<int> z(n + 1);
	for(int i = 1, x = 0, y = 0; i < n; i++) {
		if(i <= y) z[i] = min(y - i, z[i - x]);
		while(i + z[i] < n && s[i + z[i]] == s[z[i]]) ++z[i];
		if(y <= i + z[i]) x = i, y = i + z[i];
	}
	z[0] = n;
	return z;
}
vector<int> z_function(const string &s) {
	return z_function(s, s.size());
}

int main() {
#ifdef local
	freopen("in.txt", "r", stdin);
#define M 40
#endif
	ios::sync_with_stdio(false);
	cin.tie(0), cout.tie(0);
	int n, k; cin >> n >> k;
	vector<string> vs(n);
	for(auto &s : vs) cin >> s;
	vector<bitset<M> > ok(n + 1);
	ok[n][k] = 1;
	for(int i = n - 1; i >= 0; i--) {
		ok[i] = ok[i + 1] | (ok[i + 1] >> vs[i].size());
	}
	string ans;
	bitset<M> dp;
	dp[0] = 1;
	for(int i = 0; i < n; i++) {
		auto z = z_function(vs[i] + ans);
		int l = vs[i].size();
		for(int j = 0; j <= ans.size() && j + l <= k; j++) {
			if(!dp[j] || !ok[i + 1][j + l]) continue;
			int d = z[j + l];
			if(d >= l) {
				dp[j + l] = 1;
				continue;
			}
			if(j == ans.size() || vs[i][d] < ans[j + d]) {
				ans = ans.substr(0, j) + vs[i];
				for(int o = j + d + 1; o <= k; o++) dp[o] = 0;
				dp[ans.size()] = 1;
				break;
			}
		}
	}
	cout << ans << '\n';
	return 0;
}