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>
#define _1 first
#define _2 second
using namespace std;
const int N=2050;
char s[N][N<<3];
int n,k,len[N];
bitset<N<<3> f[N];
pair<int,int> v[2][N<<3];
int main()
{
	scanf("%d%d",&n,&k);
	for(int i=1;i<=n;++i){
		scanf("%s",s[i]+1);
		len[i]=strlen(s[i]+1);
	}
	f[n+1][0]=1;
	for(int i=n;i>=1;--i)
		f[i]=f[i+1]|(f[i+1]<<len[i]);
	int cnt=0;
	for(int i=1;i<=n;++i)
		if(f[i+1][k-len[i]]) 
			v[1][++cnt]=make_pair(i,1);
	for(int t=1;t<=k;++t){
		int i=t&1;
		char ch='z'; 
		int ncnt=0;
		for(int j=1;j<=cnt;++j)
			ch=min(ch,s[v[i][j]._1][v[i][j]._2]);
		putchar(ch);
		int nw=n+1;
		for(int j=1;j<=cnt;++j)
		{
			if(s[v[i][j]._1][v[i][j]._2] != ch) 
				continue;
			if(v[i][j]._2<len[v[i][j]._1]) 
				v[i^1][++ncnt]=make_pair(v[i][j]._1 , v[i][j]._2+1);
			else nw=min(nw, v[i][j]._1);
		}
		for(int j=nw+1;j<=n;++j)
			if(k-t-len[j]>=0&&f[j+1][k-t-len[j]]) v[i^1][++ncnt]=make_pair(j,1);
		cnt=ncnt;
	}
	return 0;
}