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>
using namespace std;
long long n, k; string s;
int main() {
	cin >> n >> k >> s;
	if(k >= log2(n)+2){
		char c = 'z';
		for(char i:s) c = min(c, i);
		for(int i=0;i<n;i++)cout << c; cout << endl;
	}
	else{
		string sc=s;
		reverse(sc.begin(), sc.end());
		s+=sc;
		for(int i=0;i<n+1;i++)sc = min(sc, s.substr(i,n));
		long long p=1, pk;
		for(int i=1;i<sc.size();i++)if(sc[i]==sc[0])p++;else break;
		k--;pk=p;
		for(int i=0;i<k;i++)p*=2;
		if(k==0)cout<<sc<<endl;
		else if(p>=n)for(int i=0;i<n;i++)cout << sc[0];
		else{
			for(int i=0;i<p-pk;i++){sc=sc[0]+sc;sc.pop_back();}
			cout<<sc;
		}
		cout<<endl;
	}
	return 0;
}