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>
#define rep(i,a,b) for (int i = (a); i <= (b); ++i)
#define drep(i,a,b) for (int i = (a); i >= (b); --i)
#define grep(i,u) for (int i = head[u],v = e[i].v; i; v = e[i = e[i].nxt].v)
#define il inline
#define LL long long
#define ULL unsigned LL
#define pb push_back
#define mp make_pair
#define fi first
#define se second
using namespace std;
il LL read() {
	LL res = 0,f = 1; char ch = getchar(); while (!isdigit(ch)) {if (ch == '-') f = -f; ch = getchar();}
	while (isdigit(ch)) {res = res*10+ch-'0'; ch = getchar();} return res*f;
}
namespace qiqi {
	const int N = 1e4+5; int n,m,k; char s[N]; 
	void main() {
		n = read(); m = n<<1; k = read(); int x = 0,y; while ((1<<x) < n) ++x; k = min(k,x); scanf("%s",s+1); rep(i,1,n) s[m-i+1] = s[i];
		x = 1; while (x <= n) {int i = y = x,j = x+1; while (j <= m && s[i] <= s[j]) i = s[i] < s[j++] ? x : i+1; while (x <= i) x += j-i;}
		rep(i,1,n) s[i] = s[i+y-1]; s[n+1] = x = 0; rep(i,1,n) {++x; if (s[i] != s[i+1]) break;} y = min(x<<(k-1),n); drep(i,n,y+1) s[i] = s[i-y+x]; rep(i,1,y) s[i] = s[1]; puts(s+1);
	}
}
int main() {
	qiqi::main(); return 0;
}