Package for this problem was not updated by the problem writer or Codeforces administration after we’ve upgraded the judging servers. To adjust the time limit constraint, solution execution time will be multiplied by 2. For example, if your solution works for 400 ms on judging servers, then value 800 ms will be displayed and used to determine the verdict.

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

The problem statement has recently been changed. View the changes.

×
B. String

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputOne 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 *x*_{i} < *y*_{i}, and for any *j* (1 ≤ *j* < *i*) *x*_{j} = *y*_{j}. 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 10^{5}. The second line contains the only integer *k* (1 ≤ *k* ≤ 10^{5}).

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".

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Dec/01/2020 08:42:22 (h3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|