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