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<iostream>
#include<string>
#include<algorithm>    
#include<cmath>
#include<map>
#include<vector>
#include<math.h>
#include<stdio.h>
#include<stack>
#include<queue>
#include<tuple>
#include<cassert>
#include<set>
#define int long long
#define mod(int)(1000000007)
using namespace std;
string test[345678];
signed main() {
	int n, k, a = 1; string s; char mi = 'z'; cin >> n >> k >> s;
	for (int h = 0; h < n; h++) { mi = min(mi, s[h]); }
	if (s[n - 1] == mi) { a = 2; }
	for (int h = 2; h <= min(k, (long long)15); h++) {
		a *= 2;
		if (a >= n) { 
			for (int i = 0; i < n; i++) { cout << mi; } cout << endl; return 0;
		}
	}
	string r = s;
	for (int h = 0; h < k; h++) {
		string t = r; reverse(r.begin(), r.end()); t += r;
		for (int i = 0; i < n + 5; i++) { test[i] = ""; }
		if (h == k - 1) {
			for (int i = 0; i <= n; i++) {
				for (int j = i; j < i + n; j++) {
					test[i] += t[j];
				}
			}
			sort(test, test + n + 1); 
			cout << test[0] << endl; return 0;
		}
		else {
			reverse(t.begin(), t.end());
			for (int i = 0; i <= n; i++) {
				for (int j = i; j < i + n; j++) {
					test[i] += t[j];
				}
			}
			sort(test, test + n + 1); r = test[0];
			reverse(r.begin(), r.end());
		}
	}
	return 0;
}