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<bits/stdc++.h>
using namespace std;

typedef long long LL;

const int N=5000;

int n,m;
char s[N+9];

void into(){
  scanf("%d%d%s",&n,&m,s+1);
  m=min(m,15);
}

char ans[N+9],tmp[N+9];

bool Check_cmp(){
  if (!ans[1]) return 1;
  for (int i=1;i<=n;++i)
	if (tmp[i]^ans[i]) return tmp[i]<ans[i];
  return 0;
}

void Get_ans(){
  char mn='z';
  for (int i=1;i<=n;++i) mn=min(mn,s[i]);
  int mx=0;
  for (int i=1,c=0;i<=n;++i){
	s[i]==mn?++c:c=0;
	mx=max(mx,c<<(i==n));
  }
  if (mx*(1<<m-1)>=n){
	for (int i=1;i<=n;++i) ans[i]=mn;
	return;
  }
  for (int i=1,c=0;i<=n;++i){
	s[i]==mn?++c:c=0;
	if (c<<(i==n)<mx) continue;
	int ct=0;
	for (int j=1;j<=mx*(1<<m-1);++j) tmp[++ct]=mn;
	for (int j=i+1;j<=n&&ct<n;++j) tmp[++ct]=s[j];
	for (int j=i==n?n-c:n;j>=1&&ct<n;--j) tmp[++ct]=s[j];
    if (Check_cmp())
	  for (int j=1;j<=n;++j) ans[j]=tmp[j];
  }
}

void work(){
  Get_ans();
}

void outo(){
  for (int i=1;i<=n;++i)
	putchar(ans[i]);
  puts("");
}

int main(){
  into();
  work();
  outo();
  return 0;
}