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 ll long long
#define pb push_back
#define mp make_pair
const int N=100050;
const int M=2*N;
vector<pair<pair<int,int> ,int> > tmp;
int id[M],per[M];
char s[M];
void BuildSuffixArray(int n)
{
	int i,j;
	for(i=1;i<=n;i++) id[i]=s[i]-'a';
	for(j=0;j<20;j++)
	{
		tmp.clear();
		for(i=1;i<=n;i++) tmp.pb(mp(mp(id[i],id[i+(1<<j)]),i));
		sort(tmp.begin(),tmp.end());
		int cnt=0;
		for(i=0;i<tmp.size();i++)
		{
			id[tmp[i].second]=cnt;
			cnt+=((i+1==tmp.size()) || (tmp[i].first!=tmp[i+1].first));
		}
		if(cnt==n) break;
	}
	for(i=1;i<=n;i++) id[i]++;
	for(i=1;i<=n;i++) per[id[i]]=i;
}
int main()
{
	int n,k;
	scanf("%i %i",&n,&k);
	scanf("%s",s+1);
	int t=n;
	for(int i=n;i>=1;i--) s[++t]=s[i];
	s[++t]='a'+27;
	BuildSuffixArray(t);
	int pos=per[1];
	for(int i=1;i<=t;i++) if(t-per[i]>=n){ pos=per[i];break;}
	int sz=0;
	while(sz<n && s[pos+sz]==s[pos]) sz++;
	//ll mx=(ll)sz*(k-1);
	ll mx=sz;
	for(int i=1;i<k;i++)
	{
		mx=mx*2;
		if(mx>=n) break;
	}
	if(mx>=n)
	{
		for(int i=1;i<=n;i++) printf("%c",s[pos]);
		return 0;
	}
	//int use=sz*(k-1);
	for(int i=1;i<=mx-sz;i++) printf("%c",s[pos]);
	for(int i=0;i<n-mx+sz;i++) printf("%c",s[pos+i]);
	return 0;
}