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 pb push_back
#define mp make_pair
#define fi first
#define se second
#define SZ(x) ((int)x.size())
#define ref(i,x,y)for(int i=x;i<=y;++i)
#define def(i,x,y)for(int i=x;i>=y;--i)
using namespace std;
typedef long long LL;
typedef pair<int,int> PII;
int n,m;char a[5010];
char c,ans[5010],s[5010];
void ck(){
	ref(i,1,n)if(s[i]<ans[i])break;else if(s[i]>ans[i])return;
	ref(i,1,n)ans[i]=s[i];
}
void work(int x){
	int nn=0;
	ref(i,x,n)s[++nn]=a[i];
	def(i,n,n-x+2)s[++nn]=a[i];
	int ct=0,lct=0;
	ref(i,1,n)if(s[i]==c){
		ct++;
	}else break;
	lct=ct;
	int mm=m;
	while(ct<n&&mm>0)ct*=2,mm--;
	if(ct>n)ct=n;
	def(i,n-ct,1)s[i+ct]=s[i+lct];
	ref(i,1,ct)s[i]=c;
	ck();
}
int main(){
	scanf("%d%d",&n,&m);m--;
	scanf("%s",a+1);
	ref(i,1,n)ans[i]=a[i];
	c=a[1];
	ref(i,1,n)if(a[i]<c)c=a[i];
	ref(i,1,n)if(a[i]==c)if(i==1||a[i]!=a[i-1])
		work(i);
	ref(i,1,n)cout<<ans[i];cout<<endl;
}