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 MN 2000
using namespace std;
inline int read()
{
    int x=0,f=1;char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
    return x*f;
}
char st[1000005];
int n,K,lt[MN+5],rt[MN+5],yes[MN+5];
bitset<1000001> b[26],S;
bitset<10005> f[MN+5],can;
bool Solve(int x,int len)
{
    if(((S<<1)&b[x]).any()) return true;
    for(int i=1,flag=0;i<=n;++i)
    {
        if(S[rt[i-1]]) flag=1;
        if(flag&&st[lt[i]]-'a'<=x&&f[i][len]) return true;
    }
    return false;
}
int main()
{  
    n=read();K=read();
    for(int i=1,len=0;i<=n;++i) 
    {
        scanf("%s",st+len+1);
        lt[i]=len+1,rt[i]=(len+=strlen(st+len+1));
        for(int j=lt[i]+1;j<=rt[i];++j) b[st[j]-'a'][j]=1;
    }
    can[K]=1;
    for(int i=n;i;--i) f[i]=can>>(rt[i]-lt[i]+1),can|=f[i];
    for(int i=1;i<26;++i) b[i]|=b[i-1];S[0]=1;
    for(int i=1;i<=K;++i)
    {
        int l=0,r=24,mid,res=25;
        while(l<=r)
        {
            mid=l+r>>1;
            if(Solve(mid,i-1)) res=mid,r=mid-1;
            else l=mid+1;
        }
        for(int j=1,flag=0;j<=n;++j)
        {
            if(S[rt[j-1]]) flag=1;
            if(flag&&st[lt[j]]-'a'==res&&f[j][i-1]) yes[j]=1;
            else yes[j]=0;
        }
        putchar(res+'a');S=(S<<1)&b[res];
        for(int j=1;j<=n;++j) if(yes[j]) S[lt[j]]=1;
    }
    return 0;
}