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 <string>
#include <cstdio>
#include <bitset>
#include <iostream>
#include <algorithm>
using namespace std;
#define Maxn 2000
#define Maxk 10000
int n,k;
string s[Maxn+5];
string ans;
bitset<Maxk+5> can[Maxn+5];
pair<int,int> vis[2][Maxn+5];
int main(){
	ios::sync_with_stdio(false);
	cin>>n>>k;
	for(int i=1;i<=n;i++){
		cin>>s[i];
	}
	can[n+1][0]=1;
	for(int i=n;i>0;i--){
		can[i]=(can[i+1]|(can[i+1]<<(int)s[i].size()));
	}
	int cnt=0,tot;
	for(int i=1;i<=n;i++){
		if(can[i+1][k-(int)s[i].size()]){
			vis[0][++cnt]=make_pair(i,0);
		}
	}
	char mn_c;
	int tmp=0;
	int id,len;
	int mn_new;
	for(int i=0;i<k;i++){
		mn_c='z';
		for(int j=1;j<=cnt;j++){
			mn_c=min(mn_c,s[vis[tmp][j].first][vis[tmp][j].second]);
		}
		ans+=mn_c;
		tot=0;
		mn_new=n+1;
		for(int j=1;j<=cnt;j++){
			id=vis[tmp][j].first;
			len=vis[tmp][j].second;
			if(s[id][len]!=mn_c){
				continue;
			}
			if(len+1==(int)s[id].size()){
				mn_new=min(mn_new,id);
			}
			else{
				vis[tmp^1][++tot]=make_pair(id,len+1);
			}
		}
		tmp^=1;
		for(int j=mn_new+1;j<=n;j++){
			if(k-(int)s[j].size()-i>0&&can[j+1][k-(int)s[j].size()-i-1]){
				vis[tmp][++tot]=make_pair(j,0);
			}
		}
		cnt=tot;
	}
	cout<<ans<<endl;
	return 0;
}