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
n,k=map(int,input().split())
s=input()
slist=list(s)
num=0
for i in range(17):
    if 2**num>=n:
        num+=1
        break
    num+=1
if k>=num:
    slist.sort()
    ans=slist[0]*n
    print(ans)
else:
    for i in range(n):
        slist.append(slist[n-1-i])
    s1=[]
    for i in range(n+1):
        s1.append(slist[i:i+n])
    s1.sort()
    sstr=s1[0]
    ss2=""
    for i in range(n):
        ss2+=sstr[i]
    s3=sstr[0]
    num10=1
    for i in range(n-1):
        if s3!=sstr[i+1]:
            break
        else:
            num10+=1
    s2=""
    for i in range(n):
        s2+=sstr[-1-i]
    slist.sort()
    num=min((2**(k-1))*num10,n)
    num2=n-num
    ans=slist[0]*num
    ans+=ss2[num10:num10+num2]
    print(ans)
