#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  string str, p;
  cin >> str;
  if (n == 1) {
    for (int i = 1; i <= m; ++i) cout << str;
  } else {
    int y;
    for (int i = 1; i < n; ++i) {
      int x = i;
      y = 0;
      while (x < n && str[x] == str[y]) x++, y++;
      if (x == n) break;
    }
    while (1) {
      for (int i = 0; i < n - y && m != 1; ++i) p.push_back(str[i]);
      if (m == 1) p += str;
      m--;
      if (m == 0) break;
    }
    cout << p << endl;
  }
}
