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
#include<bits/stdc++.h>
#define MN 5000
using namespace std;
inline int read()
{
	int x=0,f=1;char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
	return x*f;
}
int n,K,mxlen,ans=0,Len;
char s[MN*2+5],A='z';
void Try(int x)
{
 //   cout<<"Try"<<x<<endl;
    if(!ans) return (void)(ans=x);
    for(int i=0;i<n-Len;++i)
    {
        if(s[ans-i]<s[x-i]) return;
        if(s[x-i]<s[ans-i]) {ans=x;return;}
    }
}
int main()
{
    n=read();K=read();scanf("%s",s+1);
    for(int i=1;i<=n;++i) A=min(A,s[i]);
  //  cout<<A<<endl;
    for(int j,i=1;i<=n;++i) if(s[i]==A)
    {
        for(j=i;j<n&&s[j+1]==A;++j);
        mxlen=max(mxlen,(j-i+1)*(j==n?2:1));
        i=j;
    }
    if(K>20||(mxlen<<K-1)>=n) {for(int i=1;i<=n;++i) putchar(A);return 0;}
    Len=mxlen<<K-1;
    for(int i=1;i<=n;++i) s[2*n+1-i]=s[i];
    for(int i=1,j;i<=n;++i) if(s[i]==A)
    {
        for(j=i;j<n&&s[j+1]==A;++j);
        int actlen=(j-i+1)*(j==n?2:1);
        if(actlen==mxlen) j==n?Try(i-1):Try(2*n-j);
    }
 //   cout<<"ans="<<ans<<endl;
    for(int i=1;i<=Len;++i) putchar(A);
    for(int i=0;i<n-Len;++i) putchar(s[ans-i]);
    return 0;
}