Problem: You are given a string t consisting of n lowercase Latin letters and an integer number k.

Let's define a substring of some string s with indices from l to r as s[l ... r].

Your task is to construct such string s of minimum possible length that there are exactly k positions i such that s[i ... i + n - 1] = t. In other words, your task is to construct such string s of minimum possible length that there are exactly k substrings of s equal to t.

It is guaranteed that the answer is always unique.

Input

The first line of the input contains two integers n and k (1 ≤ n, k ≤ 50) — the length of the string t and the number of substrings.

The second line of the input contains the string t consisting of exactly n lowercase Latin letters.

Output

Print such string s of minimum possible length that there are exactly k substrings of s equal to t.

It is guaranteed that the answer is always unique.

Examples

Input

3 4
aba


Output

ababababa


Input

3 2
cat


Output

catcat

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
long long int power(long long int a, long long int b) {
  a %= mod;
  long long int ret = 1;
  while (b) {
    if (b & 1) ret *= a;
    a *= a;
    if (ret >= mod) ret %= mod;
    if (a >= mod) a %= mod;
    b >>= 1;
  }
  return ret;
}
long long int add(long long int a, long long int b) {
  return (((a % mod) + (b % mod)) % mod);
}
long long int sub(long long int a, long long int b) {
  return (((a % mod) - (b % mod)) % mod);
}
long long int mul(long long int a, long long int b) {
  return (((a % mod) * (b % mod)) % mod);
}
long long int bs(vector<long long int> v, long long int l, long long int r,
                 long long int ele) {
  long long int mid;
  do {
    mid = l + ((r - l) / 2);
    if (v[mid] == ele)
      return mid;
    else if (ele < v[mid])
      r = mid - 1;
    else
      l = mid + 1;
  } while (l <= r);
  return -1;
}
bool isprime(long long int n) {
  if (n == 1) {
    return false;
  }
  int i = 2;
  while (i * i <= n) {
    if (n % i == 0) {
      return false;
    }
    i += 1;
  }
  return true;
}
void divisors(long long int n) {
  vector<long long int> v;
  for (long long int i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i)
        v.push_back(i);
      else {
        v.push_back(i);
        v.push_back(n / i);
      }
    }
  }
  sort(v.begin(), v.end());
}
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long int check(long long int n) {
  int count = 0;
  while (n != 0) {
    if (n % 10 == 3) count++;
    n /= 10;
  }
  return count;
}
long long int sumofn(long long int n) {
  long long int ans = 0;
  if (n % 2 == 0) {
    ans = ((n + 1) * (n / 2));
  } else {
    ans = (((n + 1) / 2) * n);
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, k;
  string str;
  cin >> n >> k;
  cin >> str;
  map<string, int> mymap;
  string x = "";
  string ans = "";
  for (int i = 0; i < n; i++) {
    x += str[i];
    mymap[x] = 1;
  }
  bool found = true;
  for (int i = 0; i < n / 2; i++) {
    if (str[i] != str[n - i - 1]) found = false;
  }
  if (n == 1) {
    for (int j = 0; j < k; j++) ans += str;
  } else if (found == false) {
    char ch = str[0];
    int i = 1;
    string temp;
    bool first = false;
    for (; i < n && first != true; i++) {
      if (str[i] == ch) {
        temp = str.substr(i, n - i);
        if (mymap[temp] == 1) first = true;
      }
    }
    if (i == n && first == false) {
      for (int j = 0; j < k; j++) ans += str;
    } else {
      i--;
      string temp2 = str.substr(0, n - (n - i - 1));
      ans += temp2;
      temp2 = str.substr(1, n - (n - i));
      for (int j = 1; j < k; j++) ans += temp2;
      ans += str.substr(i + 1, n - i - 1);
    }
  } else {
    int count;
    char ch = str[0];
    string temp;
    bool first = false;
    int i = 1;
    for (; i < n && first != true; i++) {
      if (str[i] == ch) {
        temp = str.substr(i, n - i);
        if (mymap[temp] == 1) first = true;
      }
    }
    i--;
    string temp2 = str.substr(0, n - (n - i - 1));
    ans += temp2;
    temp2 = str.substr(1, n - (n - i));
    for (int j = 1; j < k; j++) ans += temp2;
    ans += str.substr(i + 1, n - i - 1);
  }
  cout << ans << endl;
  return 0;
}