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;


#define MAX 2002

int n;
int k;

#define MM 10002

char buf[MM];

vector<string> v;


bitset<1000000> b;

int star[MAX];

bitset<1000000> lab[26];

bool dp[2002][10002];
bool use[2002][10002];

inline bool dfs(int a, int b) {
	if (a == n) {
		return b == k;
	}
	if (b > k) {
		return false;
	}
	if (use[a][b]) {
		return dp[a][b];
	}
	use[a][b] = true;
	dp[a][b] = dfs(a + 1, b) | dfs(a + 1, b + v[a].size());
	return dp[a][b];
}
string ans;
int main() {
	cin >> n >> k;
	for (int i = 0; i < n; i++) {
		scanf("%s", buf);
		v.push_back(buf);
	}
	int sum = 0;
	for (int i = 0; i < n; i++) {
		star[i] = sum;
		sum+=v[i].size();
		for (int j = 0; j < v[i].size(); j++) {
			for (int k = v[i][j] - 'a'; k < 26; k++) {
				lab[k].set(star[i]+(v[i].size()-j-1), 1);
			}
		}
		if (dfs(i+1,v[i].size() ) ) b.set(star[i] + v[i].size() - 1, 1);
	}
	star[n] = sum;
	for (int i2 = 0; i2 < k; i2++) {
		int mint = -1;
		int maxt = 25;
		while (mint + 1 < maxt) {
			int mid = (mint + maxt) >> 1;
			if ((lab[mid] & b).any()) {
				maxt = mid;
			}
			else {
				mint = mid;
			}
		}
		mint++;
		b &= lab[mint];
		ans.push_back('a' + mint);
		if (i2 + 1 == k)break;
		//next move
		int add = n;
		for (int i = 0; i < n; i++) {
			if (b.test(star[i])) {
				add = min(add,i + 1);
				b.reset(star[i]);
			}
		}
		b >>= 1;
		for (int j = add; j < n; j++) {
			if (dfs(j + 1,i2 + 1 + v[j].size())) {
				b.set(star[j + 1] - 1, 1);
			}
		}
	}
	printf("%s\n", ans.c_str());
	return 0;
}