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;
char s[N][10010];
bitset<10010>ok[2010];
int n,k;
int len[2010];
char ans[10010];
pair<int,int>p[2][20010];
int cnt,ncnt;
int main()
{
    //freopen("H:\\c++1\\in.txt","r",stdin);
    //freopen("H:\\c++1\\out.txt","w",stdout);
    scanf("%d%d",&n,&k);
    for(int i=1;i<=n;i++){
        scanf("%s",s[i]+1);//
        len[i]=strlen(s[i]+1);//
    }
    ok[n+1][0]=1;
    for(int i=n;i>=1;i--){
        ok[i]=ok[i+1]|(ok[i+1]<<len[i]);
    }
    for(int i=1;i<=n;i++){
        if(ok[i+1][k-len[i]]){
            p[0][++cnt]=make_pair(i,1);//
        }
    }
    int f=0;
    for(int i=1;i<=k;i++){//
        char mi='z';
        for(int j=1;j<=cnt;j++){
            mi=min(mi,s[p[f][j].first][p[f][j].second]);
        }
        ans[i]=mi;
        //cout<<ans[i]<<endl;
        ncnt=0;
        int pp=n+1;
        for(int j=1;j<=cnt;j++){
            int id=p[f][j].first,pos=p[f][j].second;
            if(mi!=s[id][pos])continue;
            if(pos==len[id])pp=min(pp,id);//
            else p[f^1][++ncnt]=make_pair(id,pos+1);
        }
        for(int j=pp+1;j<=n;j++){
            if(k>=i+len[j]&&ok[j+1][k-i-len[j]])p[f^1][++ncnt]=make_pair(j,1);//
        }
        f^=1;
        cnt=ncnt;
    }
    printf("%s\n",ans+1);//
    return 0;
}
*/
#include<bits/stdc++.h>
using namespace std;
bitset<10010> ok[2010];
pair<int,int> p[2][10010];
char s[2010][10010],ans[1000010];
int len[2010],n,k,cnt=0,ncnt=0;
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);
    ok[n+1][0]=1;
    for (int i=n;i>=1;i--)
        ok[i]=ok[i+1]|(ok[i+1]<<len[i]);
    for (int i=1;i<=n;i++)
        if (ok[i+1][k-len[i]]) p[0][++cnt]=make_pair(i,1);
    int f=0;
    for (int i=1;i<=k;i++)
    {
        char mi='z';
        for (int j=1;j<=cnt;j++) mi=min(mi,s[p[f][j].first][p[f][j].second]);
        ans[i]=mi;
        int mx=n+1;
        ncnt=0;
        for (int j=1;j<=cnt;j++)
        {
            int id=p[f][j].first,pos=p[f][j].second;
            if (s[id][pos]!=mi) continue;
            if (pos==len[id]) mx=min(mx,id);
            else p[f^1][++ncnt]=make_pair(id,pos+1);
        }
        for (int j=mx+1;j<=n;j++)
            if (k-len[j]-i>=0&&ok[j+1][k-len[j]-i]) p[f^1][++ncnt]=make_pair(j,1);
        f^=1;
        cnt=ncnt;
    }
    printf("%s\n",ans+1);
}