Problem

There is a string $ S $ of length $ N $. All characters in $ S $ are numbers between 0 and 9.
When you make a sequence of $ \ frac {N \ times (N + 1)} {2} $, which is the number of terms created by enumerating all the numbers created from all the substrings of $ S $, Find the smallest value in $ H $.

Constraints

The input satisfies the following conditions.

* $ 1 \ leq N \ leq 10 ^ 5 $
* $ 1 \ leq H \ leq \ frac {N \ times (N + 1)} {2} $
* $ | S | = N $
* All characters in $ S $ are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Input

The input is given in the following format.


$ N $ $ H $
$ S $


All inputs are given as integers.
$ N $ and $ H $ are given on the first line, separated by blanks.
The second line is given the string $ S $ of length $ N $.

Output

Output the $ H $ th value on one line.
(Do not include extra 0s at the beginning of the output.)

Examples

Input

2 3
00


Output

0


Input

4 9
0012


Output

12


Input

5 13
10031


Output

100
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;

class suffix_array {
	// This is an O(n log^2 n) suffix array algorithm.
	// It uses hashing (modulo 2^64) so the hash value may collide.
private:
	int size_;
	std::string s;
	std::vector<unsigned long long> prefix_hash;
	std::vector<unsigned long long> powers;
public:
	suffix_array(std::string s_) : s(s_) {
		size_ = s.size();
		prefix_hash = std::vector<unsigned long long>(size_ + 1);
		powers = std::vector<unsigned long long>(size_ + 1);
		powers[0] = 1;
		for (int i = 0; i < size_; i++) {
			prefix_hash[i + 1] = prefix_hash[i] * 311 + (s[i] - 48);
			powers[i + 1] = powers[i] * 311;
		}
	}
	int hash_value(int l, int r) {
		return prefix_hash[r] - powers[r - l] * prefix_hash[l];
	}
	int lcp(int x, int y) {
		int l = -1, r = std::min(size_ - x, size_ - y) + 1;
		while (r - l > 1) {
			int m = (l + r) >> 1;
			if (hash_value(x, x + m) == hash_value(y, y + m)) l = m;
			else r = m;
		}
		return l;
	}
	std::vector<int> suffix_arrray() {
		std::vector<int> ret(size_ + 1);
		for (int i = 0; i <= size_; i++) ret[i] = i;
		std::sort(ret.begin(), ret.end(), [&](int i, int j) {
			int len = lcp(i, j);
			if (i + len == size_) return true;
			if (j + len == size_) return false;
			return s[i + len] < s[j + len];
		});
		return ret;
	}
};

long long N, H, c[100009], sa[100009]; string S;

long long solve(int num) {
	long long T = 0, sum = 0;
	for (int i = 0; i < N; i++) {
		while (T < S.size() && S[T] == '0') T++;
		long long U = T + num; U = min(U, N);
		sum += (U - i);
		T = max(T, (long long)(i + 1));
	}
	return sum;
}

int main() {
	cin >> N >> H >> S;
	c[0] = 1;
	for (int i = 0; i < S.size(); i++) {
		if (S[i] == '0') c[i + 1] = c[i] + 1;
		else c[i + 1] = 1;
	}
	long long L = 0, R = N + 1, M, maxn = -1;
	for (int i = 0; i < 20; i++) {
		M = (L + R) / 2;
		long long p = solve(M);
		if (p < H) { maxn = max(maxn, M); L = M; }
		else { R = M; }
	}
	maxn++;
	if (maxn == 0) {
		cout << "0" << endl;
	}
	else {
		suffix_array L(S);
		vector<int>G = L.suffix_arrray();

		for (int i = 0; i < G.size(); i++) sa[G[i]] = i;

		vector<pair<int, int>>F;
		for (int i = 0; i < (int)S.size() - maxn + 1; i++) {
			if (S[i] == '0') continue;
			for (int j = 0; j < c[i]; j++) F.push_back(make_pair(sa[i], i));
		}
		sort(F.begin(), F.end());

		long long ss = solve(maxn - 1);
		int index = F[H - ss - 1].second;
		cout << S.substr(index, maxn) << endl;
	}
	return 0;
}
