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<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int n,K;
char s[101010],an[101010];
int main()
{
	scanf("%d%d",&n,&K);
	scanf("%s",s+1);
	char mi='z';
	for(int i=1;i<=n;i++) s[n+n-i+1]=s[i],mi=min(mi,s[i]);
	//cout<<s+1<<endl;
	if(K>=14||pow(2,K-1)>=n)
	{
		for(int i=1;i<=n;i++) putchar(mi); puts("");
		return 0;
	}
	int ml=pow(2,K-1),mal=0;
	for(int i=1;i<=n+n;i++)
	if(s[i]==mi)
	{
		int r;
		for(r=i;r<=n+n;r++)
		if(s[r]!=mi) break;
	//	cout<<i<<" "<<r<<endl;
		if(r<=n+1){ i=r;continue;}
		if((r-i)*ml>=n)
		{
			for(int j=1;j<=n;j++) putchar(mi); puts("");
			return 0;
		}
		if(r-i>mal)
		{
			mal=r-i;
			for(int j=1;j<=n-mal*ml;j++)
			an[j]=s[i-j];
		}
		else if(r-i==mal)
		{
			for(int j=1;j<=n-mal*ml;j++)
			if(an[j]^s[i-j])
			{
				if(an[j]>s[i-j])
					for(int k=j;k<=n-mal*ml;k++)
					an[k]=s[i-k];
				break;
			}
		}
		i=r;
	}
	for(int i=1;i<=mal*ml;i++) putchar(mi);
	for(int j=1;j<=n-mal*ml;j++) printf("%c",an[j]);
	puts("");
	return 0;
}