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 fo(i,a,b)for(int i=a,_e=b;i<=_e;++i)
using namespace std;
const int N=10005;
int n,k,mi,sz=sizeof(char);
char c[N],a[N*2],b[N*2],ans[N];
void get(int k,int i,int j){
	memcpy(a,c,(n+1)*sz);
	if(k==1&&j<n){
		fo(l,1,n)a[n+l]=a[n-l+1];
		memcpy(b+1,a+1,n*2);
		memcpy(a+1,b+i,n*sz);
		return;
	}
	if(j<n){
		--k;
		fo(l,1,n)a[n+l]=a[n-l+1];
		memcpy(b+1,a+1,n*2);
		memcpy(a+1,b+n-i+2,n*sz);
		i=j-i+1;
	}else i=n-i+1;
	if(k>=13||(i<<k)>=n){
		fo(l,1,n)a[l]=mi;
		return;
	}
	fo(l,1,n-i)b[l]=a[l];
	reverse(b+1,b+n-i+1);
	fo(l,1,i<<k)a[l]=mi;
	fo(l,(i<<k)+1,n)a[l]=b[l-(i<<k)];
}
bool pd(char *a,char *b){
	fo(i,1,n){
		if(a[i]<b[i])return 1;
		if(a[i]>b[i])return 0;
	}
	return 0;
}
int main(){
	scanf("%d%d\n%s",&n,&k,c+1);
	memcpy(ans,c,(n+1)*sz);
	mi=255;
	fo(i,1,n)mi=min(mi,(int)c[i]);
	fo(i,1,n)if(c[i]==mi){
		int j=i;
		for(;j<n&&c[j+1]==mi;)++j;
		get(k,i,j);
		if(pd(a,ans))memcpy(ans,a,(n+1)*sz);
		i=j;
	}
	fo(i,1,n)putchar(ans[i]);
}