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
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

//template
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(a);i>(b);i--)
#define ALL(v) (v).begin(),(v).end()
typedef long long int ll; typedef pair<ll, ll> P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<typename A,size_t N,typename T>void Fill(A(&array)[N],const T &val){fill((T*)array, (T*)(array+N), val);}
const int inf = INT_MAX / 2; const ll INF = LLONG_MAX / 2;
//template end

string f(string s,int n){
    rrep(i,n-1,-1)s+=s[i];
    string t,res="";
    rep(i,1,n+1){
        t=s.substr(i,n); reverse(ALL(t));
        if(res=="")res=t;
        else chmin(res,t);
    }
    reverse(ALL(res));
    return res;
}
string g(string s,int n){
    string res=s;
    rrep(i,n-1,-1)s+=s[i];
    rep(i,1,n+1)chmin(res,s.substr(i,n));
    return res;
}

int main(){
    int n,k; scanf("%d%d",&n,&k);
    string s; cin>>s;
    rep(rot,0,min(16,k-1))s=f(s,n);
    cout<<g(s,n)<<endl;
    return 0;
}
