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 <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <algorithm>
#include <utility>
#include <deque>
#include <stack>
#include <bitset>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<int,ll> pil;
typedef pair<ll,int> pli;
#define rep(i,n) for (int i=0;i<n;++i)
#define REP(i,n) for (int i=1;i<=n;++i)
#define all(x) x.begin(),x.end()
#define mp make_pair
#define pb push_back
#define pf push_front
#define F first
#define S second
#define read(x) scanf("%d",&x)
typedef bitset<1000005> bs;
int n,k;
string s[2005];
char S[1000005];
int Len=0;
bool can[2005][10005];
int len[2005],idx[2005];
bs segtree[64];
bs state;
inline int getBest(){
	int u=1;
	while(u<32){
		if ((state&segtree[u*2]).none()) u=u*2+1;
		else u*=2;
	}
	return (char)(u-32+'a');
}
int main(){
	//ios::sync_with_stdio(false);
	cin>>n>>k;
	for (int i=1;i<=n;++i) cin>>s[i];
	for (int i=1;i<=n;++i) len[i]=s[i].size();
	for (int i=1;i<=n;++i) if (len[i]>k) return 1;
	can[n][k]=1;
	for (int i=n;i>=1;--i){
		for (int j=k;j>=len[i];--j) if (can[i][j]) can[i-1][j]=can[i-1][j-len[i]]=1;
	}
	for (int i=1;i<=n;++i){
		for (int j=0;j<len[i];++j){
			S[Len+j]=s[i][j];
		}
		idx[i]=Len;//beginning pos
		Len+=len[i];
	}
	for (int i=0;i<64;++i) segtree[i].reset();
	for (int i=0;i<Len;++i) segtree[S[i]-'a'+32].set(i);
	for (int i=31;i>0;--i) segtree[i]=segtree[i<<1]|segtree[i<<1|1];
	state.reset();
	state.set(0);
	for (int i=0;i<k;++i){// alrady got i chars
		for (int j=1;j<n;++j) if (state[idx[j]]) state.set(idx[j+1]);
		for (int j=1;j<=n;++j) if (i+len[j]>k||!can[j][i+len[j]]) state.reset(idx[j]);
		char nxt=getBest();
		cout<<nxt;
		state&=segtree[nxt-'a'+32];
		state<<=1;// move on
	}
	cout<<endl;
	return 0; 
}