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
#pragma GCC optimize (2)
#pragma G++ optimize (2)
#include<bits/stdc++.h>
#define INF 0x3f3f3f3f
#define MAX 5005
using namespace std;
//char nc()
//{
//	static char buf[100000],*p1=buf,*p2=buf;
//	return p1==p2&&(p2=(p1=buf)+fread(buf,1,100000,stdin),p1==p2)?EOF:*p1++;
//}
char nc(){return getchar();}
int read()
{
	int x=0,y=1;
	char c=nc();
	while(!isdigit(c))
	{
		if(c=='-')y=-1;
		c=nc();
	}
	while(isdigit(c))
	{
		x=(x<<1)+(x<<3)+(c^48);
		c=nc();
	}
	return x*y;
}
int n,k;
char s[MAX<<1],ans[MAX];
void chkmn(int st)
{
	for(int i=0;i<n;i++)
		if(s[st+i]<ans[i])
		{
			for(int j=0;j<n;j++)
				ans[j]=s[st+j];
			return;
		}
		else if(s[st+i]>ans[i]) return;
}
int main()
{
	n=read();k=read();
	scanf("%s",s);
	for(int i=0;i<n;i++)
		s[n+i]=s[n-i-1];
	ans[0]='z'+1;
	for(int i=0;i<n;i++)
		chkmn(i);
	int L=0;
	while(L<n&&ans[L]==ans[0]) L++;
	if(k>14||L*(1<<(k-1))>=n)
		for(int i=0;i<n;i++)
			putchar(ans[0]);
	else
	{
		int len=L*(1<<(k-1));
		for(int i=0;i<len;i++)
			putchar(ans[0]);
		for(int i=len;i<n;i++)
			putchar(ans[i-len+L]);
	}
	return 0;
}
