#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, l, j;
  string str, s = "";
  cin >> n >> k >> str;
  l = str.length() - 1;
  j = 1;
  while (l > 0) {
    string s1 = str.substr(0, l);
    string s2 = str.substr(j, l);
    if (s1 == s2) {
      s = str.substr(l, str.length() - l);
      break;
    }
    l--;
    j++;
  }
  if (!s.length()) s = str;
  k--;
  while (k--) {
    str = str + s;
  }
  cout << str << endl;
}
