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<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
#include<cassert>
#include<complex>
using namespace std;

//#define int long long
typedef long long ll;

typedef unsigned long long ul;
typedef unsigned int ui;
const ll mod = 1000000007;
const ll INF = mod * mod;
typedef pair<int, int> P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef pair<ll, ll> LP;
typedef vector<ll> vec;
typedef long double ld;
typedef pair<ld, ld> LDP;
const ld eps = 1e-5;
const ld pi = acos(-1.0);

typedef bitset<10001> bt;

void solve() {
	int n, k; cin >> n >> k;
	vector<string> s(n);
	rep(i, n) {
		cin >> s[i];
	}
	vector<bt> b(n + 1);
	b[n] = 0; b[n][0] = 1;
	per(i, n) {
		b[i] = b[i + 1] | (b[i + 1] << s[i].size());
	}
	string ans;
	vector<int> u(k + 1, mod);
	rep(i, n) {
		if (k >= s[i].size() && b[i + 1][k - s[i].size()]) {
			if (u[s[i].size()] == mod) {
				u[s[i].size()] = i;
			}
			else {
				int id = u[s[i].size()];
				if (s[id] > s[i]) {
					u[s[i].size()] = i;
				}
			}
		}
	}
	rep(i, k) {
		int mi = 25;
		rep1(j, k) {
			if (u[j] == mod)continue;
			int id = u[j];
			mi = min(mi, s[id][s[id].size() - j] - 'a');
		}
		char ch = 'a' + mi;
		vector<int> nex;
		//cout << i << " " << u[1] << endl;
		if (u[1] < mod&&s[u[1]][s[u[1]].size() - 1] == ch) {
			Rep(j, u[1] + 1, n) {
				if (k - i - 1 >= s[j].size() && b[j + 1][k - i - 1 - (int)s[j].size()]) {
					nex.push_back(j);
				}
			}
		}
		ans.push_back(ch);
		u[1] = mod;
		Rep1(j, 2, k) {
			if (u[j] == mod)continue;
			if (s[u[j]][s[u[j]].size() - j] == ch) {
				u[j - 1] = u[j];
			}
			u[j] = mod;
		}
		rep(j, nex.size()) {
			int id = nex[j];
			//cout << i << " " << id << endl;
			int len = s[id].size();
			if (u[len] == mod) {
				u[len] = id;
			}
			else {
				int to = u[len];
				if (to < id) {
					if (s[to].substr(s[to].size() - len, len) > s[id]) {
						u[len] = id;
					}
				}
				else {
					if (s[to].substr(s[to].size() - len, len) >= s[id]) {
						u[len] = id;
					}
				}
				
			}
		}
	}
	cout << ans << endl;
}

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	//cout << fixed << setprecision(50);
	//init();
	solve();

	//cout << "finish" << endl;
	//stop
	return 0;
}