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 INF = LLONG_MAX - 100;
const long long mod = 1000000007;
template <typename T>
void adder(T &v, T &v2) {
  v.insert(v.end(), v2.begin(), v2.end());
}
template <typename T, typename... Args>
void adder(T &first, T &second, Args &...args) {
  first.insert(first.end(), second.begin(), second.end());
  adder(first, args...);
}
template <typename T>
void compressor(T &first, T &second) {
  for (auto &i : second)
    i = lower_bound(first.begin(), first.end(), i) - first.begin();
}
template <typename T, typename... Args>
void compressor(T &first, T &second, Args &...args) {
  for (auto &i : second)
    i = lower_bound(first.begin(), first.end(), i) - first.begin();
  compressor(first, args...);
}
template <typename T, typename... Args>
void coordinate_compress(T &first, Args &...args) {
  adder(first, args...);
  sort(first.begin(), first.end());
  auto ip = std::unique(first.begin(), first.end());
  first.resize(std::distance(first.begin(), ip));
  compressor(first, args...);
}
const long long maxn = 1e6 + 10;
struct data {
  long long sum, pref, suff, ans;
};
vector<data> t(4 * maxn);
vector<data> lazy(4 * maxn);
data combine(data l, data r) {
  data res;
  res.sum = l.sum + r.sum;
  res.pref = max(l.pref, l.sum + r.pref);
  res.suff = max(r.suff, r.sum + l.suff);
  res.ans = max(max(l.ans, r.ans), l.suff + r.pref);
  return res;
}
data make_data(long long val) {
  data res;
  res.sum = val;
  res.pref = res.suff = res.ans = max((long long)0, val);
  return res;
}
vector<long long> a(maxn);
void build(long long v, long long tl, long long tr) {
  if (tl == tr) {
    t[v] = make_data(a[tl]);
  } else {
    long long tm = (tl + tr) / 2;
    build(v * 2, tl, tm);
    build(v * 2 + 1, tm + 1, tr);
    t[v] = combine(t[v * 2], t[v * 2 + 1]);
  }
}
void update(long long v, long long tl, long long tr, long long pos,
            long long new_val) {
  if (tl == tr) {
    t[v] = make_data(new_val);
  } else {
    long long tm = (tl + tr) / 2;
    if (pos <= tm)
      update(v * 2, tl, tm, pos, new_val);
    else
      update(v * 2 + 1, tm + 1, tr, pos, new_val);
    t[v] = combine(t[v * 2], t[v * 2 + 1]);
  }
}
data query(long long v, long long tl, long long tr, long long l, long long r) {
  if (l > r) return make_data(0);
  if (l == tl && r == tr) return t[v];
  long long tm = (tl + tr) / 2;
  return combine(query(v * 2, tl, tm, l, min(r, tm)),
                 query(v * 2 + 1, tm + 1, tr, max(l, tm + 1), r));
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  string t;
  cin >> t;
  int index = -1;
  for (int i = 1; i < t.size(); i++) {
    bool flag = true;
    for (int j = 0; i + j < t.size(); j++) {
      if (t[j] != t[i + j]) flag = false;
    }
    if (flag) {
      index = i;
      break;
    }
  }
  string s = t;
  int count = 1;
  if (index == -1) {
    for (int i = 0; i < k - 1; i++) s += t;
    cout << s << endl;
    return 0;
  }
  string holder = t.substr(t.size() - index, t.size());
  for (int i = 0; i < k - 1; i++) s += holder;
  cout << s << endl;
}