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 ll long long
using namespace std;
int n,K;
string s,ans;
char mn;
void get_S(string&s){
	string t=s;
	reverse(t.begin(),t.end());
	s+=t;
}
void solve(string s,int K){
	int now=0;
	while(now<n&&s[n-now-1]==mn) now++;
	for(;K>1;K--){
		get_S(s);
		s=s.substr(min(now,n),n);
		now<<=1;
	}
	get_S(s);
	s=s.substr(max(0,n-now),n);
	ans=min(ans,s);
}
int main(){
	ios::sync_with_stdio(0);
	cin>>n>>K;
	cin>>s;
	mn='z';
	for(int i=0;i<n;i++)
		mn=min(mn,s[i]);
	if(K>13){
		for(int i=0;i<n;i++) putchar(mn);
		puts("");
		return 0;
	}
	get_S(s);
	ans+=127;
	int mxlen=0;vector<int> w;
	for(int i=0;i<2*n;i++){
		if(i<=n&&K==1) ans=min(ans,s.substr(i,n));
		if(i>0&&s[i-1]==mn) continue;
		int len=0;
		while(i+len<2*n&&s[i+len]==mn) len++;
		if(len>mxlen) w.clear(),mxlen=len;
		if(len==mxlen&&i+len>=n) w.push_back(i+len);
	}
	if(K>1)
	for(auto x:w){
		string t=s.substr(x-n,n);
		solve(t,K-1);
	}
	cout<<ans<<'\n';
	return 0;
}
