#D8427. Hth Number
Hth Number
Hth Number
Problem
There is a string of length . All characters in are numbers between 0 and 9. When you make a sequence of , which is the number of terms created by enumerating all the numbers created from all the substrings of , Find the smallest value in .
Constraints
The input satisfies the following conditions.
- All characters in are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Input
The input is given in the following format.
All inputs are given as integers. and are given on the first line, separated by blanks. The second line is given the string of length .
Output
Output the 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
inputFormat
input satisfies the following conditions.
- All characters in are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Input
The input is given in the following format.
All inputs are given as integers. and are given on the first line, separated by blanks. The second line is given the string of length .
outputFormat
Output
Output the 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
样例
5 13
10031
100