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
// Remember...

#include<bits/stdc++.h>

#define F first
#define S second
#define PB push_back
#define sz(s) int((s).size())
#define bit(n,k) (((n)>>(k))&1)

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

const int maxn=5010,mod=998244353;

int main(){
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie();

    int n,k; cin>>n>>k;
    string s; cin>>s;
    
    k=min(k,15);

    string ss=s, ans=s, tmp;
    reverse(ss.begin(),ss.end());
    ss=s+ss;
    
    for(int i=0;i<=n;i++){
	s=ss.substr(i,n);

	if(k==1){
	    ans=min(ans,s);
	    continue;
	}
	
	int cnt1=0,cnt2=0;
	while(cnt1<n && s[n-1-cnt1]==s.back()) cnt1++;
	cnt2=min(n, cnt1<<(k-1));
	tmp="";
	for(int i=0;i<cnt2;i++)
	    tmp+=s.back();
	if(cnt2<n){
	    tmp+=s.substr(cnt2-cnt1,n-cnt2);
	    reverse(tmp.begin()+cnt2,tmp.end());
	}
	ans=min(ans,tmp);
    }
    return cout<<ans<<endl,0;   
}
// Deathly mistakes:
//  * Read the problem carefully.
//  * Check maxn.
//  * Overflows.


// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
