Takahashi has a string S of length N consisting of lowercase English letters. On this string, he will perform the following operation K times:

* Let T be the string obtained by reversing S, and U be the string obtained by concatenating S and T in this order.
* Let S' be some contiguous substring of U with length N, and replace S with S'.



Among the strings that can be the string S after the K operations, find the lexicographically smallest possible one.

Constraints

* 1 \leq N \leq 5000
* 1 \leq K \leq 10^9
* |S|=N
* S consists of lowercase English letters.

Input

Input is given from Standard Input in the following format:


N K
S


Output

Print the lexicographically smallest possible string that can be the string S after the K operations.

Examples

Input

5 1
bacba


Output

aabca


Input

10 2
bbaabbbaab


Output

aaaabbaabb
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,K = map(int,readline().split())
S = read().rstrip().decode('utf-8')

if K > 30:
    K = 30

SS = S + S[::-1]

if K == 1:
    answer = min(SS[i:i+N] for i in range(N+1))
    print(answer)
    exit()

min_ch = min(S)
run_len = [0] * len(SS)
for i,x in enumerate(SS):
    if x == min_ch:
        run_len[i] = run_len[i-1] + 1

max_len = max(run_len)
I = [i for i,x in enumerate(run_len[N-1:],N-1) if x == max_len]

if (max_len << (K-1)) >= N:
    answer = min_ch * N
    print(answer)
    exit()

L = max_len << (K-1)
cand = []
for i in I:
    T = SS[i-N+1:i+1]
    cand.append(T[-max_len-1:-max_len-(N-L)-1:-1])

answer = min_ch * L + min(cand)
print(answer)