#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t, n, e, x, y, z, i, j, k, g, q, ans = 0, sum = 0, c = 0;
  cin >> n >> x;
  string s, s1, s2, s3;
  cin >> s;
  for (i = 0; i < n; i++) {
    s2.clear();
    s1.clear();
    for (j = i + 1; j < n; j++) {
      s2 += s[j];
    }
    for (j = 0; j < n && j < s2.size(); j++) {
      s1 += s[j];
    }
    k = j;
    if (s1 == s2) {
      for (j = k; j < n; j++) {
        s3 += s[j];
      }
      break;
    }
  }
  cout << s1;
  for (i = 1; i <= x; i++) {
    cout << s3;
  }
  return 0;
}
