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;

int main() {
	int n, k;
	cin>>n>>k;
	string s;
	cin>>s;
	string t = s;
	reverse(t.begin(), t.end());
	char c = 'z';
	for (auto &p:s) c = min(c, p);
	s += t;
	int mx = 0;
	for (int i = 0, cur = 0; i < s.length(); i ++) {
		if (s[i] == c) cur ++;
		else cur = 0;
		mx = max(mx, cur);
	}
	if (k >= 14 || (mx<<k-1) >= n) {
		for (int i = 0; i < n; i ++) cout<<c;
		return 0;
	}
	string ans;
	for (int i = 0; i <= n; i ++) {
		if (k > 1) {
			int j = i + n - 1;
			int cnt = 0;
			for (int k = j; k >= i && s[k] == c; k --) cnt ++;
			if (cnt < mx) continue;
			int d = (mx<<k-1) - mx;
			int f = i + d;
			string t = s.substr(f, n-(mx<<k-1));
			for (int l = n - 1; l >= n - (mx<<k-1); l --) t.push_back(c);
			reverse(t.begin(), t.end());
			if (ans.empty() || t < ans) {
				ans = t;
			}
		}
		else {
			string t = s.substr(i, n);
			if (ans.empty() || t < ans) {
				ans = t;
			}
		}
	}
	cout<<ans;
	return 0;
}
