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 <cmath>
#include <cstdio>
#include <cassert>
#include <cstring>
#include <algorithm>
#define meow(args...) fprintf(stderr, args)
const int N=5005;
int n, k;
char s[N], t[N<<1];
int main() {
	assert(scanf("%d%d%s", &n, &k, s)==3);
	char c=*std::min_element(s, s+n);
	if(k>log2(n)+1) {
		std::fill(s, s+n, c);
		puts(s);
		return 0;
	}
	while(k--) {
		std::copy(s, s+n, t);
		std::reverse_copy(s, s+n, t+n);
		int cho=0;
		for(int i=1; i<=n; ++i) if(strcmp(t+i, t+cho)<0) cho=i;
		std::reverse_copy(t+cho, t+cho+n, s);
	}
	std::reverse(s, s+n);
	puts(s);
	return 0;
}
