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 mxn = 262144;
const int mxlg = 22;
long long n;
int suffix[mxlg][mxn], Rank[mxn], lcp[mxn];
struct entry {
  int nr[2], p;
} L[mxn];
bool cmp(entry const a, entry const b) {
  return a.nr[0] == b.nr[0]  ? (a.nr[1] < b.nr[1] ? true : false)
         : a.nr[0] < b.nr[0] ? true
                             : false;
}
string str;
int lg, ln, stp;
void build_suffix_array() {
  ln = str.size();
  for (int i = 0; i < ln; i++) {
    suffix[0][i] = str[i] - 'a';
  }
  for (stp = 1, lg = 1; (lg >> 1) < ln; stp++, lg <<= 1) {
    for (int i = 0; i < ln; i++) {
      L[i].nr[0] = suffix[stp - 1][i];
      L[i].nr[1] = i + lg < ln ? suffix[stp - 1][i + lg] : -1;
      L[i].p = i;
    }
    sort(L, L + ln, cmp);
    for (int i = 0; i < ln; i++) {
      suffix[stp][L[i].p] =
          i > 0 && L[i].nr[0] == L[i - 1].nr[0] && L[i].nr[1] == L[i - 1].nr[1]
              ? suffix[stp][L[i - 1].p]
              : i;
    }
  }
  stp -= 1;
  for (int i = 0; i < ln; i++) {
    Rank[suffix[stp][i]] = i;
  }
}
void big_o_LCP() {
  for (int i = 0; i < ln; i++) {
    Rank[suffix[stp][i]] = i;
  }
  int now = 0;
  for (int i = 0; i < ln; i++) {
    now = max(now - 1, 0);
    if (suffix[stp][i] == ln - 1) {
      now = 0;
      continue;
    }
    int j = Rank[suffix[stp][i] + 1];
    while (i + now < ln && j + now < ln && str[i + now] == str[j + now]) now++;
    lcp[suffix[stp][i]] = now;
  }
}
int nlogn_lcp(int x, int y) {
  int ret = 0;
  if (x == y) return ln - x;
  for (int k = stp; k >= 0 && x < ln && y < ln; k--) {
    if (suffix[k][x] == suffix[k][y]) {
      x += (1 << k);
      y += (1 << k);
      ret += (1 << k);
    }
  }
  return ret;
}
long long ar[mxn];
long long tree1[4 * mxn];
void build1(int node, int beg, int endd) {
  if (beg == endd) {
    tree1[node] = 0;
    return;
  }
  int left = node << 1;
  int right = left + 1;
  int mid = (beg + endd) / 2;
  build1(left, beg, mid);
  build1(right, mid + 1, endd);
  tree1[node] = 0;
  return;
}
void uppdate(int node, int beg, int endd, int i, int j, int val) {
  if (i > j) return;
  if (beg == i && endd == j) {
    tree1[node] = val;
    return;
  }
  int left = node << 1;
  int right = left + 1;
  int mid = (beg + endd) / 2;
  if (tree1[node]) {
    tree1[left] = tree1[node];
    tree1[right] = tree1[node];
    tree1[node] = 0;
  }
  uppdate(left, beg, mid, i, min(j, mid), val);
  uppdate(right, mid + 1, endd, max(mid + 1, i), j, val);
  tree1[node] = 0;
  return;
}
long long geet(int node, int beg, int endd, int i) {
  if (i < 0) return 0;
  if (i == beg && i == endd) {
    return tree1[node];
  }
  int left = node << 1;
  int right = left + 1;
  int mid = (beg + endd) / 2;
  if (tree1[node]) {
    tree1[left] = tree1[node];
    tree1[right] = tree1[node];
    tree1[node] = 0;
  }
  if (i <= mid) {
    return geet(left, beg, mid, i);
  } else {
    return geet(right, mid + 1, endd, i);
  }
}
long long fuck(int x, int y) { return nlogn_lcp(x, y); }
long long find_max_match(int pos, int lm) {
  int l = pos;
  int r = n - 1;
  int ret = 0;
  while (l <= r) {
    int m = (l + r) / 2;
    int got = fuck(Rank[pos], Rank[m]);
    if (got >= lm && got != INT_MAX) {
      ret = m;
      l = m + 1;
    } else {
      r = m - 1;
    }
  }
  return ret;
}
void solve(int k) {
  for (int cur = 0; cur < n; cur++) {
    int limit = n - Rank[cur];
    int len = geet(1, 0, n - 1, cur) + 1;
    for (; len <= limit; len++) {
      long long got = find_max_match(cur, len);
      uppdate(1, 0, n - 1, cur, got, len);
      got = got - cur + 1;
      k -= got;
      if (k <= 0) {
        int st = Rank[cur];
        int lst = st + len;
        for (; st < lst; st++) {
          cout << str[st];
        }
        cout << '\n';
        return;
      }
    }
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> str;
  build_suffix_array();
  n = str.size();
  int k;
  cin >> k;
  long long tot = n * (n + 1);
  tot /= 2;
  if (tot < k)
    cout << "No such line." << endl;
  else {
    build1(1, 0, max(n - 1, (long long)0));
    solve(k);
  }
  return 0;
}
