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>
#define FOR(i,a,b) for(int i=a;i<=b;i++)
using namespace std;
const int N=100100;
int n,K,L;
char x,s[N],t[N],a[N],b[N];
int main(){
	//freopen("1.in","r",stdin);
	scanf("%d%d%s",&n,&K,s+1);
	if(n==1) return puts(s+1),0;
	a[1]=x='z'+1;
	FOR(i,1,n) x=min(x,s[i]),s[i+n]=s[n-i+1];
	if(K>=14){FOR(i,1,n) putchar(x);return 0;}
	for(int l=1,r;l<=n;l=r+1){
		for(r=l;r<n && s[r]==s[r+1];r++);
		if(s[l]>x) continue;
		L=(1<<K-(r<n))*(r-l+1);
		if(L>=n){
			FOR(i,1,n) putchar(x);
			return 0;
		}
		FOR(i,1,L) b[i]=x;
		FOR(i,1,n-L) b[i+L]=r<n?s[2*n-r+1-i]:s[l-i];
		//cout<<l<<' '<<r<<' '<<L<<'\n';puts(s+1);puts(b+1);
		FOR(i,1,n)if(b[i]!=a[i]){
			if(b[i]<a[i]) FOR(j,1,n) a[j]=b[j];
			break;
		} 
	}
	puts(a+1);
} 