Abracadabra#2984

Abracadabra

1 second
64 megabytes
Easy

During its operation, the data compression algorithm using the "block sorting" method applies a transformation to blocks of data, defined as follows.

A string is called a rotation of a string if it is formed by a cyclic shift of the characters of . Specifically, if S = a_1 a_2 \dots a_N, where a_i is the -th character of the string , then P = a_p a_{p+1} \dots a_N a_1 \dots a_{p-1}, where 1 \leq p \leq N. Consider a table of size N \times N, whose rows are all rotations of the string , sorted in lexicographical (dictionary) order in ascending order.

Let the string be the last column of the table . The direct transformation takes the string as input and outputs the string along with the number — the row number of the table that contains the string . (If there are several such rows, the number of any one of them is output).

For S = \text{`abraka`}, the table is shown in the figure. The string is located in the second row of the table , and L = \text{`karaab`}.

Write a program that performs the inverse transformation, i.e., takes the string and the number as input, and outputs the string .

Example

Input

The first line of the input file contains two integers: and , where 1 \leq N \leq 30000 and 1 \leq K \leq N. The second line contains characters of the string — lowercase Latin letters.

Output

The single line of the output file should contain the string .

Examples

\begin{example}\exmp{2 6karaab}{abraka}%\end{example}

Example 1

Loading
Loading