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 <vector>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <stdio.h>
using namespace std;
#define int long long
int MOD = 1000000007;
signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int N, K;
	cin >> N >> K;
	string S;
	cin >> S;
	string T = S;
	reverse(T.begin(), T.end());
	S += T;

	char mn = 'z';
	for (int i = 0; i < N; i++) {
		mn = min(mn, S[i]);
	}
	vector<string> res;
	for (int i = 0; i <= N; i++) {
		T = "";
		for (int j = 0; j < N; j++) {
			T.push_back(S[i + j]);
		}
		res.push_back(T);
	}
	if (K > 30) {
		K = 30;
	}

	if (K > 1) {
		for (int i = N; i < 2 * N; i++) {
			if (S[i] == mn && (i == 2 * N - 1 || S[i + 1] != mn)) {
				int j = i;
				for (;; j--) {
					if (j == -1 || S[j] != mn)break;
				}

				T = "";
				for (int k = 0; k < min(N, (i - j) << (K - 1)); k++) {
					T.push_back(mn);
				}
				for (; j >= 0; j--) {
					if (T.size() == N)break;
					T.push_back(S[j]);
					
				}
				if (T.size() == N) {
					res.push_back(T);
				}
			}
		}
	}
	sort(res.begin(), res.end());


	cout << res[0] << endl;
}