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 rep(i,a,b) for(int i=(a);i<=(b);i++)
#define per(i,a,b) for(int i=(a);i>=(b);i--)
#define REP(i,n) for(int i=(0);i<(n);i++)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
using namespace std;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef long long ll;

template<class T> inline void read(T &x){
	int f=0;x=0;char ch=getchar();
	for(;!isdigit(ch);ch=getchar())f|=(ch=='-');
	for(;isdigit(ch);ch=getchar())x=x*10+ch-'0';
	if(f)x=-x;
}

const int N=5005;
int n,K,mn=233,mx;
char s[N],t[N],ans[N];

void doit(int K,int l,int r){
	rep(T,1,K-1){
		rep(i,1,l-1)t[i]=t[i+n-(l-1)];
		reverse(t+l,t+n+1);
		if(r<n)l=n-(r-l),r=n;
		else l=2*l-n-1;
		if(l<=0)return;
	}
	rep(i,l,n)t[i-l+1]=t[i];
	reverse(t+n-l+2,t+n+1);
}

int main(){
	read(n),read(K);
	K=min(K,15);
	scanf("%s",s+1);
	memcpy(ans,s,sizeof s);
	rep(i,1,n)
		mn=min(mn,(int)s[i]);
	for(int l=1,r;l<=n;l++)
		if(s[l]==mn){
			for(r=l;r<n&&s[r+1]==mn;r++);
			if(r-l<mx&&r<n)continue;
			mx=max(mx,r-l);
			memcpy(t,s,sizeof s);
			doit(K,l,r);
			if(strcmp(t+1,ans+1)<0)memcpy(ans,t,sizeof t);
			l=r;
		}
	puts(ans+1);
	return 0;
}