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<stdio.h>
#include<vector>
#include<algorithm>
#include<string>
#include<iostream>
using namespace std;
int main()
{
	int num, kai;
	scanf("%d%d", &num, &kai);
	string s;
	cin >> s;
	for (int i = 0; i < num; i++)s.push_back(s[num - 1 - i]);
	char mini = 'z';
	for (int i = 0; i < s.size(); i++)mini = min(mini, s[i]);
	string ans;
	ans.push_back('z' + 1);
	if (kai == 1)
	{
		for (int i = 0; i <= num; i++)
		{
			string z;
			for (int j = 0; j < num; j++)z.push_back(s[i + j]);
			ans = min(ans, z);
		}
		cout << ans << endl;
		return 0;
	}
	for (int p = num; p <= num + num; p++)
	{
		int x = 0;
		for (int i = p - 1; i >= 0; i--)
		{
			if (s[i] == mini)x++;
			else break;
		}
		if (x == 0)continue;
		int xx = x;
		for (int i = 0; i < kai - 1; i++)
		{
			if (x == num)break;
			x = min(x * 2, num);
		}
		string z;
		for (int i = 0; i < x; i++)z.push_back(mini);
		for (int i = 0; i < num - x; i++)z.push_back(s[p - xx - i - 1]);
		ans = min(ans, z);
	}
	cout << ans << endl;
}