One day in the IT lesson Anna and Maria learned about the lexicographic order.

String x is lexicographically less than string y, if either x is a prefix of y (and x ≠ y), or there exists such i (1 ≤ i ≤ min(|x|, |y|)), that xi < yi, and for any j (1 ≤ j < i) xj = yj. Here |a| denotes the length of the string a. The lexicographic comparison of strings is implemented by operator < in modern programming languages​​.

The teacher gave Anna and Maria homework. She gave them a string of length n. They should write out all substrings of the given string, including the whole initial string, and the equal substrings (for example, one should write out the following substrings from the string "aab": "a", "a", "aa", "ab", "aab", "b"). The resulting strings should be sorted in the lexicographical order. The cunning teacher doesn't want to check all these strings. That's why she said to find only the k-th string from the list. Help Anna and Maria do the homework.

Input

The first line contains a non-empty string that only consists of small Latin letters ("a"-"z"), whose length does not exceed 105. The second line contains the only integer k (1 ≤ k ≤ 105).

Output

Print the string Anna and Maria need — the k-th (in the lexicographical order) substring of the given string. If the total number of substrings is less than k, print a string saying "No such line." (without the quotes).

Examples

Input

aa
2


Output

a


Input

abc
5


Output

bc


Input

abab
7


Output

b

Note

In the second sample before string "bc" follow strings "a", "ab", "abc", "b".
#include <bits/stdc++.h>
using namespace std;
const int oo = numeric_limits<int>::max();
const int n_oo = numeric_limits<int>::min();
const int ALF = 26;
struct SuffixAutomaton {
  int toInt(char c) { return c - 'a'; }
  char toChar(int j) { return char(j + 'a'); }
  struct Nodo {
    vector<int> hijos;
    int r;
    int l;
    int sl;
    Nodo(int L = 0) : hijos(ALF, -1), l(L), sl(0), r(1) {}
    int& operator[](int idx) { return hijos[idx]; }
  };
  vector<int> orden;
  vector<long long int> seen;
  int n, ult;
  vector<Nodo> t;
  void extender(char c) {
    int act = n++;
    t.push_back(Nodo(t[ult].l + 1));
    int p = ult;
    while (~p && t[p][toInt(c)] == -1) {
      t[p][toInt(c)] = act;
      p = t[p].sl;
    }
    if (~p) {
      int q = t[p][toInt(c)];
      if (t[q].l == t[p].l + 1) {
        t[act].sl = q;
      } else {
        int clon = n++;
        t.push_back(t[q]);
        t[clon].l = t[p].l + 1;
        t[clon].r = 0;
        t[q].sl = t[act].sl = clon;
        while (~p && t[p][toInt(c)] == q) {
          t[p][toInt(c)] = clon;
          p = t[p].sl;
        }
      }
    }
    ult = act;
  }
  SuffixAutomaton(string s = "") : n(1), ult(0), t(1) {
    t[0].sl = -1;
    for (int i = 0; i < s.size(); i++) extender(s[i]);
  }
  void rTopoSort() {
    int m = t[ult].l;
    vector<vector<int> > bks(m + 1);
    for (int i = 0; i < n; i++) bks[t[i].l].push_back(i);
    for (int i = m; i >= 0; i--)
      for (int j = 0; j < bks[i].size(); j++) orden.push_back(bks[i][j]);
  }
  void cuentaRepeticiones() {
    rTopoSort();
    for (int i = 0; i < n - 1; i++) {
      int u = orden[i];
      int v = t[u].sl;
      t[v].r += t[u].r;
    }
    t[0].r = 1;
  }
  long long int dfs(int u) {
    if (seen[u]) return seen[u];
    long long int& ret = seen[u];
    ret = t[u].r;
    for (int i = 0; i < ALF; i++) {
      if (t[u][i] == -1) continue;
      ret += dfs(t[u][i]);
    }
    return ret;
  }
  void cuentaCaminos() {
    seen = vector<long long int>(n);
    dfs(0);
  }
  string kth(long long int k) {
    int u = 0;
    k++;
    string ans;
    if (k > seen[0]) return "No such line.";
    while (true) {
      k -= t[u].r;
      if (k <= 0) return ans;
      for (int i = 0; i < ALF; i++) {
        if (t[u][i] == -1) continue;
        if (k > seen[t[u][i]])
          k -= seen[t[u][i]];
        else {
          ans.push_back(toChar(i)), u = t[u][i];
          break;
        }
      }
    }
    return ans;
  }
  void imprime() {
    for (int i = 0; i < n; i++) {
      cout << i << '\n';
      cout << "suffix link: " << t[i].sl << '\n';
      cout << "length: " << t[i].l << '\n';
      cout << "reps:" << t[i].r << '\n';
      for (int j = 0; j < ALF; j++) {
        if (t[i][j] == -1) continue;
        cout << toChar(j) << ": " << t[i][j] << ' ';
      }
      cout << '\n';
      cout << '\n';
    }
  }
};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  SuffixAutomaton SA(s);
  SA.cuentaRepeticiones();
  SA.cuentaCaminos();
  int k;
  cin >> k;
  cout << SA.kth(k) << '\n';
  return 0;
}
