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 <stdio.h>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <queue>
 
using namespace std;
 
typedef long long ll;
 
const ll INF = 1e9, MOD = 1e9 + 7, MOD2 = 1e6 + 3;

string s;

int n, k;

string process (string s) {

	if (k == 1) return s;
	int l;
	for (l = 1; l <= n && s[n - l] == s.back (); l++);
	l--;
	
	ll p;

	if (k - 1 >= 13) p = n;
	else p = min ((1 << (k - 1)) * l, n);

	string t;

	for (int i = p - l; i < n; i++)
		t += s[i];

	for (int i = 0; i < p - l; i++)
		t += s.back ();

	reverse (t.begin(), t.end());

	return t;
}

int main () {
	cin >> n >> k;

	cin >> s;

	string best = s;

	string rev_s = s;

	reverse (rev_s.begin(), rev_s.end());

	s = s + rev_s;

	for (int i = 0; i <= s.size () / 2; i++)
	{
		//cout << s.substr (i, s.size () / 2) << ' ' << process (s.substr (i, s.size () / 2)) << endl;
		best = min (process (s.substr (i, s.size () / 2)), best);
	}

	cout << best;
}