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 MP make_pair
using namespace std;
typedef pair<int,int> pii;
const int N = 2010;
char str[N][10010]; bitset<10010> can[N];
pii vis[2][N*N]; int now = 0; int cnt[2];
int len[N];
int main()
{
  int n,k;
  scanf("%d%d",&n,&k);
  for(int i=1;i<=n;i++) cin>>str[i],len[i] = strlen(str[i]);
  can[n+1][0] = 1;
  for(int i=n;i>=1;i--) can[i] =(can[i+1] << len[i]) | (can[i+1]);

  cnt[0]=cnt[1]=0;
  for(int i=1;i<=n;i++) if(can[i+1][k-len[i]])
  {
    cnt[0]++;
    vis[now][cnt[0]] = MP(i,0);
  }

  for(int i=1;i<=k;i++,now^=1)
  {
    cnt[now] = min(cnt[now] , 10000);
    char ch='z';
    for(int j=1;j<=cnt[now];j++)
    {
      int id = vis[now][j].first; int x=vis[now][j].second;
      if(str[id][x] < ch) ch = str[id][x];
    }printf("%c",ch);

    int minid = n+1; cnt[now^1] = 0;
    for(int j=1;j<=cnt[now];j++)
    {
      int id = vis[now][j].first; int x=vis[now][j].second;
      if(str[id][x] > ch) continue;
      if(x+1 == len[id]) minid = min( minid, id);
      else{cnt[now^1]++; vis[now^1][cnt[now^1]] = MP(id,x+1);}
    }
    
    for(int j=minid+1;j<=n;j++)
    {
      if((k-i-len[j])>= 0 && can[j+1][k-i-len[j]] )
      {
        cnt[now^1]++;
        vis[now^1][cnt[now^1]] = MP(j,0);
      }
    }
  }

  // cout<<(double)(clock())<<endl;
  return 0;
}