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<stdio.h>
char s[8192];
char ans[8192];
char s2[8192];
char ans2[8192];
int n,k;
void sol()
{
	if(k==0)
	{
		for(int i=0;i<n;i++)
		{
			ans2[i]=s2[i];
		}
		return;
	}
	int numa=0;
	for(int i=n-1;i>=0;i--)
	{
		if(s2[i]==s2[n-1])
		{
			numa++;
		}
		else
		{
			break;
		}
	}
	int numa2=numa;
	for(int i=0;i<k;i++)
	{
		numa2<<=1;
		if(numa2>n)
		{
			break;
		}
	}
	if(numa2>n)
	{
		numa2=n;
	}
	for(int i=0;i<numa2;i++)
	{
		ans2[i]=s2[n-1];
	}
	for(int i=0;i<n-numa2;i++)
	{
		ans2[numa2+i]=s2[n-numa-1-i];
	}
}
bool cmp()
{
	for(int i=0;i<n;i++)
	{
		if(ans2[i]!=ans[i])
		{
			return ans2[i]<ans[i];
		}
	}
	return false;
}
int main()
{
	scanf("%d%d",&n,&k);
	k--;
	scanf("%s",s);
	for(int i=0;i<n;i++)
	{
		ans[i]='z';
	}
	for(int i=0;i<=n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(i+j<n)
			{
				s2[j]=s[i+j];
			}
			else
			{
				s2[j]=s[n+n-1-i-j];
			}
		}
		sol();
		if(cmp())
		{
			for(int j=0;j<n;j++)
			{
				ans[j]=ans2[j];
			}
		}
	}
	printf("%s\n",ans);
	return 0;
}