#include <bits/stdc++.h>
using namespace std;
const int maxn = 4e5 + 5;
int main() {
  int n, k;
  while (~scanf("%d %d", &n, &k)) {
    string a;
    cin >> a;
    string tmp;
    bool flag = 0;
    for (int i = n - 1; i >= 0; i--) {
      if (a.substr(0, i) == a.substr(n - i)) {
        tmp = a.substr(i);
        flag = 1;
        break;
      }
    }
    if (flag == 0) {
      tmp = a;
    }
    cout << a;
    for (int i = 1; i < k; i++) {
      cout << tmp;
    }
    cout << endl;
  }
}
