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;

struct SuffixArray {
    int N, k;
    vector<int> rank, sa;
    string s;

    SuffixArray(string t) {
        s = t, k = 1, N = t.length();
        rank = sa = vector<int>(N+1);
        build();
    }

    bool compare_sa(int i, int j) {
        if(rank[i] != rank[j]) return rank[i] < rank[j];
        else {
            int vi = (i+k <= N ? rank[i+k] : -1);
            int vj = (j+k <= N ? rank[j+k] : -1);
            return vi < vj;
        }
    }

    void build() {
        for(int i=0; i<=N; i++) {
            sa[i] = i;
            rank[i] = (i < N ? s[i] : -1);
        }

        for(k=1; k<=N; k*=2) {
            sort(sa.begin(), sa.end(), [&](int i, int j) {
                return compare_sa(i, j);
            });

            vector<int> tmp(N+1, 0);
            tmp[ sa[0] ] = 0;
            for(int i=1; i<=N; i++) {
                tmp[ sa[i] ] = tmp[ sa[i-1] ] + (compare_sa(sa[i-1], sa[i]) ? 1 : 0);
            }

            swap(rank, tmp);
        }
    }

    string get_substr(int idx) {
        return s.substr(sa[idx]);
    }

    void output() {
        for(int i=0; i<=N; i++) {
            fprintf(stderr, "idx = %d, str = %s\n", i, get_substr(i).c_str());
        }
    }

    int operator[](int idx) const {
        return sa[idx];
    }
};

const int SIZE = 1 << 17;
struct segtree {
    long long int node[2*SIZE];
    segtree() {
        fill(node, node+2*SIZE, 0);
    }
    void update(int idx, long long int val) {
        idx += SIZE - 1;
        node[idx] += val;
        while(idx > 0) {
            idx = (idx - 1) / 2;
            node[idx] = node[2*idx+1] + node[2*idx+2];
        }
    }
    long long int query(int a, int b, int l=0, int r=SIZE, int k=0) {
        if(b <= l || r <= a) return 0;
        if(a <= l && r <= b) return node[k];
        int mid = (l + r) / 2;
        long long int vl = query(a, b, l, mid, 2*k+1);
        long long int vr = query(a, b, mid, r, 2*k+2);
        return vl + vr;
    }
};

segtree seg;
int main() {
    int N;
    long long int H; cin >> N >> H;

    string s; cin >> s;
    SuffixArray suf(s);
    // suf.output();

    int len = s.length(), cnt_zero = 0;
    vector<long long int> weight(len);
    for(size_t i=0; i<s.length(); i++) {
        if(s[i] == '0') {
            cnt_zero++;
            H -= cnt_zero;
        }
        else {
            weight[i] = cnt_zero + 1;
            // printf("weight[%zu] = %d\n", i, weight[i]);
            cnt_zero = 0;
        }
    }

    if(H <= 0) {
        cout << 0 << endl;
        return 0;
    }
    else {
        vector<int> order;
        for(int i=0; i<=len; i++) {
            if(suf[i] >= len || s[ suf[i] ] == '0') continue;
            else {
                order.push_back(i);
            }
        }

        vector<int> end_point[100010];
        for(auto x : order) {
            seg.update(x, weight[ suf[x] ]);
            // printf("pos = %d, end_point = %d, weight = %lld\n", x, N-suf[x], weight[ suf[x] ]);
            end_point[N - suf[x]].push_back(x);
        }

        int step = 1;
        for(; H > seg.query(0, len+1); step++) {
            H -= seg.query(0, len+1);
            for(auto v : end_point[step]) {
                seg.update(v, -weight[ suf[v] ]);
            }
        }

        int ub = len+1, lb = 0;
        while(ub - lb > 1) {
            int mid = (ub + lb) / 2;
            // printf("mid = %d, val = %lld\n", mid, seg.query(0, mid));
            if(H <= seg.query(0, mid)) ub = mid;
            else lb = mid;
        }

        // printf("H = %lld, lb = %d, step = %d\n", H, lb, step);
        cout << s.substr(suf[lb], step) << endl;
    }
}
