#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  string s;
  cin >> n >> k >> s;
  for (int i = 1; i < n; i++) {
    int j = 0, chk = 0;
    while (s[j] == s[j + i] && i + j < n) {
      chk = j + i;
      j++;
    }
    if (chk < n - 1) continue;
    string sf = "";
    for (int p = n - i; p < n; p++) {
      sf += s[p];
    }
    cout << s;
    while (k > 1) {
      cout << sf;
      k--;
    }
    return 0;
  }
  while (k) {
    cout << s;
    k--;
  }
}
