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
/*Lucky_Glass*/
#include<cmath>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;

const int N=20000;

int n,m;
char Is[N+5],ReS[N+5],It[N+3],Ns[N+3],Nans[N+3];

int main(){
	scanf("%d%d%s",&n,&m,Is+1);
	strcpy(ReS+1,Is+1);
	reverse(ReS+1,ReS+1+n);
	strcat(Is+1,ReS+1);
	m--;
	for(int i=1;i<=n+1;i++){
		for(int j=0;j<n;j++) It[j+1]=Is[j+i];
		It[n+1]=It[n];
		int Vlen=0;
		for(int j=n;j>=1;j--)
			if(It[j]==It[j+1]) Vlen++;
			else break;
		int logf=ceil(log2(ceil((double)n/Vlen)));
		if(m>=logf){
			for(int j=1;j<=n;j++)
				Ns[j]=It[n];
		}
		else{
			int k=n-Vlen;
			for(int j=1;j<=Vlen*(1<<m);j++)
				Ns[j]=It[n];
			for(int j=1;j+Vlen*(1<<m)<=n;j++)
				Ns[j+Vlen*(1<<m)]=It[k--];
		}
		Ns[n+1]='\0';
//		printf("%s\n",Ns+1);
		if(Nans[1]=='\0') strcpy(Nans+1,Ns+1);
		else
			if(strcmp(Nans+1,Ns+1)>0)
				strcpy(Nans+1,Ns+1);
	}
	printf("%s\n",Nans+1);
	return 0;
}
/*
10 1
bbaabbbaab
*/