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>
using namespace std;
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
#define rrep(i,a,b) for(int i=(a);i>=(b);--i)
#define MP make_pair
#define PB push_back
#define PII pair<int,int>
typedef long long LL;
const LL P = 1e9+7;
const int N = 10005;
const double pi = acos(-1);
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

char s[N];
int n, k, cont[N];

int main(){
	cin>>n>>k;
	cin>>(s+1);
	char a = 'z';
	rep(i,1,n) a = min(a, s[i]);
	rep(i,1,n) s[n*2+1-i] = s[i];
	
	int l = 0;
	cont[0] = 0;
	rep(i,1,2*n){
		cont[i] = s[i]==a ? cont[i-1] + 1 : 0;
		l = max(l, cont[i]);
	}
	
	string ans="";
	if(l>(n>>k-1)){
		rep(i,1,n)ans+=a;
		cout<<ans<<endl;
		return 0;
	}
	ans += (a+1);
	rep(i,n,2*n)if(cont[i]==l){
		string tmp="";
		int l1 = min(l<<k-1, n), beg, end;
		end = i - l, beg = end - (n - l1) + 1;
		rep(j,1,l1) tmp += a;
		if(end) rrep(j,end,beg) tmp += s[j];
		ans = min(ans, tmp);
	}
	cout<<ans<<endl;
	return 0;
}