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<cstdio>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<string>
#include<cstdlib>
#include<ctime>
#include<iostream>
#include<bitset>
using namespace std;
typedef long long ll;
#define mp make_pair
inline int ri()
{
	register int x=0;
	bool f=0;
	register char ch=getchar();
	while(ch<'0'||ch>'9')
	{
		if(ch=='-')	f=1;
		ch=getchar();
	}
	while(ch>='0'&&ch<='9')
	{
		x=(x<<3)+(x<<1)+ch-'0';
		ch=getchar();
	}
	if(f)	return -x;
	else	return x;
}
void wi(int x)
{
	if(x<0)	putchar('-'),x=-x;
	if(x>9)	wi(x/10);
	putchar(x%10+'0');
}
const int N=2020,K=10005;
string str[N];
bitset<K> can[N];
pair<int,int> t,pos[2][1000005];
char ans[K];
int main()
{
//	freopen("test.in","r",stdin); 
	int n=ri(),k=ri(),i,cnt0=0,cnt1=0,cur=0,mn,ch,len,time=0;
	for(i=1;i<=n;i++) cin>>str[i];
	can[n+1][0]=1;
	for(i=n;i>=1;i--) can[i]=can[i+1]|(can[i+1]<<(str[i].length()));
//	for(i=1;i<=n;i++) if(can[i+1][k-str[i].length()]) pos[cur][++cnt0]=mp(i,0),printf("push i=%d\n",i);
	for(i=1;i<=n;i++) if(can[i+1][k-str[i].length()]) pos[cur][++cnt0]=mp(i,0);
	for(len=1;len<=k;len++)
	{
		ch='z';cnt0=min(cnt0,k+2);
		for(i=1;i<=cnt0;i++)
		{
			time++;
			t=pos[cur][i];
			ch=min(ch,(int)str[t.first][t.second]);
		}
		ans[len]=ch;cnt1=0;mn=1e9;
		for(i=1;i<=cnt0;i++)
		{
			time++;
			t=pos[cur][i];
			if(str[t.first][t.second]!=ch) continue;
			if(t.second==str[t.first].length()-1)	mn=min(mn,t.first+1);
			else	pos[cur^1][++cnt1]=mp(t.first,t.second+1);
		}
		for(i=mn;i<=n;i++,time++)
			if(len+str[i].length()<=k&&can[i+1][k-len-str[i].length()])	pos[cur^1][++cnt1]=mp(i,0);
		cur^=1;cnt0=cnt1;
	}
	cout<<ans+1;
//	cout<<ans+1<<endl<<time;
	return 0;
}