#include <bits/stdc++.h>
using namespace std;
int i, cnt = 0;
int t, a, b, c, d, k, f, s;
int main() {
  int a, b;
  int i;
  string s;
  cin >> a >> b >> s;
  i = a - 1;
  while (s.substr(0, i) != s.substr(a - i)) {
    i--;
  }
  cout << s;
  while (b-- > 1) {
    cout << s.substr(i);
  }
}
