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 <cstdio>
#include <cstring>
#include <algorithm>
#define fo(i,a,b) for(int i=a;i<=b;i++)
#define fd(i,a,b) for(int i=a;i>=b;i--)
using namespace std;

const int N=1e4+5;

int n,k;
char st[N],an[N],tmp[N];

void chk() {
	fo(i,1,n) {
		if (an[i]<tmp[i]) return;
		if (tmp[i]<an[i]) {
			fo(j,1,n) an[j]=tmp[j];
			return;
		}
	}
}

int main() {
	scanf("%d%d",&n,&k);
	scanf("%s",st+1);
	char c='z';
	fo(i,1,n) c=min(c,st[i]);
	fo(i,1,n) st[2*n-i+1]=an[i]=st[i];
	if (st[n]==c) {
		int pos=n,len=0,y=k;
		for(;pos>=1&&st[pos]==c;pos--) len++;
		for(;len<n&&y;y--) len<<=1;
		if (len<n) {
			fo(i,1,len) tmp[i]=c;
			fo(i,len+1,n) tmp[i]=st[pos--];
		} else fo(i,1,n) tmp[i]=c;
		chk();
	}
	for(int l=n+1,r=n;l<=n*2;l=r+1) {
		while (r<n*2&&st[r+1]==st[l]) r++;
		if (st[l]==c) {
			int len=0,pos=r,y=k-1;
			for(;pos>=r-n+1&&st[pos]==c;pos--) len++; 
			for(;len<n&&y;y--) len<<=1;
			if (len<n) {
				fo(i,1,len) tmp[i]=c;
				fo(i,len+1,n) tmp[i]=st[pos--];
			} else fo(i,1,n) tmp[i]=c;
			chk();
		}
	}
	printf("%s\n",an+1);
	return 0;
}