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:
// learned from semiexp (https://atcoder.jp/contests/arc058/submissions/816918)
// L = sum(s[i])
// O(K(log26 * L + N)) with bitset
#include<bits/stdc++.h>
#define maxn 2005
#define maxl 1000005
using namespace std;
string s[maxn];
bool dp[maxn][10005];
int st[maxn];
bitset<maxl> state;
int m;
bitset<maxl> seg[70];
char query() {
	int p = 1;
	while(p < m) {
		if((state & seg[p<<1]).none())
			p = p<<1|1;
		else
			p = p<<1;
	}
	return 'a' + p - m;
}
int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	int n,k;
	cin >> n >> k;
	for(int i=1;i<=n;i++)
		cin >> s[i];
		
	dp[n+1][0] = true;
	for(int i=n;i>=1;i--) {
		for(int j=0;j<=k;j++)
			dp[i][j] = dp[i+1][j];
		for(int j=(int)s[i].size();j<=k;j++)
			dp[i][j] |= dp[i+1][j-(int)s[i].size()];
	}
	
	string tem = "";
	
	m = 32;
	for(int i=1;i<=n;i++) {
		st[i] = (int)tem.size();
		state[st[i]] = true;
		for(char c : s[i]) {
			seg[c - 'a' + m][(int)tem.size()] = true;
			tem += c;
		}
	}
	for(int i=m-1;i;i--)
		seg[i] = seg[i<<1] | seg[i<<1|1];
	
	string ans = "";
	for(int i=1;i<=k;i++) {
		for(int j=1;j<=n;j++)
			if(i + (int)s[j].size() - 1 > k || !dp[j+1][k - (i + (int)s[j].size() - 1)])
				state[st[j]] = false;
		
		char c = query();
		ans += c;
		
		state &= seg[c - 'a' + m];
		state <<= 1;

		for(int j=1;j<n;j++)
			if(state[st[j]])
				state[st[j+1]] = true;
	}
	cout << ans << '\n';
	return 0;
}