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<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
#define N 5005
inline int read(){
	int x=0,f=1;
	char c=getchar();
	while(c<'0'||c>'9'){
		if(c=='-')f=-1;
		c=getchar();
	}
	while(c>='0'&&c<='9'){
		x=(x<<1)+(x<<3)+c-'0';
		c=getchar();
	}
	return x*f;
}
int n,k,mx;
char s[N],p;
string ans;
int main(){
	n=read(),k=min(read(),15);
	scanf("%s",s+1);
	p=*min_element(s+1,s+n+1);
	for(int i=1,j=0;i<=n;++i){
		if(s[i]==p)++j;
		else j=0;
		mx=max(mx,j<<(i==n));
	}
	if(mx*(1<<k-1)>=n){
		ans=string(n,p);
		goto End;
	}
	for(int i=1,j=0;i<=n;++i){
		if(s[i]==p)++j;
		else j=0;
		if((j<<(i==n))<mx)continue;
		string tmp="";
		for(int t=1;t<=mx*(1<<k-1);++t){
			tmp+=p;
		}
		int res=n-mx*(1<<k-1);
		for(int t=i+1;t<=n&&res;++t,--res){
			tmp+=s[t];
		}
		for(int t=(i==n?n-j:n);t>=1&&res;--t,--res){
			tmp+=s[t];
		}
		if(ans.empty()||ans>tmp){
			ans=tmp;
		}
	}
	End:
		cout<<ans<<endl;
	return 0;
}

