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;
int n,k,t=1,len[2003],can[2003][20003],siz,b,loc,b1[10003],len1,che=1;
string ans,a[2003],p,dp[10003];
int main()
{
	scanf("%d%d",&n,&k);
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];
		len[i]=a[i].length();
		for(int j=0;j<len[i];j++)
			if(a[i][j]!='a'&&a[i][j]!='b')
				che=0;
	}
	if(che==1)
	{
		for(register int i=1;i<=n;i++)
		{
			len1=a[i].length();
			for(register int j=k-len1;j>=1;j--)
			if(b1[j]==1)
			{
				if(b1[j+len1]==1)
				{
					if(dp[j+len1]>dp[j]+a[i])
						dp[j+len1]=dp[j]+a[i];
				}
				else
					dp[j+len1]=dp[j]+a[i],b1[j+len1]=1;
			}
			if(b1[len1]==1)
				dp[len1]=min(dp[len1],a[i]);
			else
				dp[len1]=a[i],b1[len1]=1;		
		}
		cout<<dp[k];
		return 0;
	}
	for(int i=1;i<=n+1;i++)
		can[i][0]=1;
	for(int i=n;i>=1;i--)
		for(int j=k;j>=0;j--)
		{
			if(can[i+1][j]==1||can[i+1][j+len[i]]==1)
				can[i][j+len[i]]=1;
			if(can[i+1][j]==1)
				can[i][j]=1;
		}
	siz=k;
	while(t<=n&&ans.length()<k)
	{
		b=0;
		for(int i=n;i>=t;i--)
			if(siz-len[i]>=0&&can[i+1][siz-len[i]]==1&&(b==0||a[i]<=p))
				p=a[i],b=1,loc=i;
		t=loc+1,ans+=p,siz-=len[loc];
		if(b==0)
			return 0;
	}
	cout<<ans;
	return 0;	
}