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 <bits/stdc++.h>
using namespace std;
int n, k;
char s[10004], res[10004], c = 'z';
int l[10004], len, mx, vis;

void cpy(int p) {
    for (int i = 1; i <= n; ++i) res[i] = s[p + i - 1];
}

void check(int p) {
    if (!vis) cpy(p), vis = 1;
    for (int i = 1; i <= n; ++i) {
        if (res[i] < s[p + i - 1]) return;
        if (res[i] > s[p + i - 1]) return cpy(p);
    }
}

int main() {
    scanf("%d%d%s", &n, &k, s + 1);
    for (int i = 1; i <= n; ++i) c = min(c, s[(n << 1) + 1 - i] = s[i]);
    if (k >= 15) {
        for (int i = 1; i <= n; ++i) putchar(c);
        return 0;
    }
    if (k == 1) {
        for (int i = 1; i <= n + 1; ++i) check(i);
        for (int i = 1; i <= n; ++i) putchar(res[i]);
        return 0;
    }
    for (int i = 1; i <= n + n; ++i)
        (s[i] == c) ? mx = max(mx, l[i] = l[i - 1] + 1) : 0;

    if ((len = mx << k - 1) >= n) {
        for (int i = 1; i <= n; ++i) putchar(c);
        return 0;
    }
    for (int i = 1; i <= n + mx; ++i)
        if (l[i] == mx) check(i - l[i] + 1);
    for (int i = 1; i <= len; ++i) putchar(c);
    for (int i = len + 1; i <= n; ++i) putchar(res[i - len + mx]);
    return 0;
}