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<cstdio>
const int MaxN=5010;
int N,K,L[MaxN*2];
char S[MaxN*2],mc='z';
bool cmp(int i,int j){
	for(;S[i]==S[j];i++,j++);
	return S[i]<S[j];
}
int main(){
	scanf("%d%d%s",&N,&K,S);
	for(int i=0;i<N;i++)(S[N*2-i-1]=S[i])<mc?mc=S[i]:1;
	if(K>15)K=15;
	int ml=0;
	for(int i=0;i<N*2;i++){
		L[i+1]=S[i]==mc?L[i]+1:0;
		L[i+1]>ml?ml=L[i+1]:1;
	}
	int r=N-(ml<<K-1);
	if(r<0)r=0;
	int p=-1;
	for(int i=N;i<=N*2;i++)if(L[i]==ml&&(p<0||cmp(N*2-i+ml,p)))p=N*2-i+ml;
	for(int i=N-r;i--;)putchar(mc);
	for(int i=0;i<r;i++)putchar(S[p+i]);
	puts("");
}