#include <bits/stdc++.h>
using namespace std;
char a[105], rez[105];
int main() {
  ios::sync_with_stdio(false);
  int i, j, n, k;
  char ch;
  cin >> n >> k >> a;
  strcpy(rez, a);
  j = 1;
  for (i = 1; i < n; i++) {
    ch = a[n - i];
    a[n - i] = 0;
    if (strcmp(rez + i, a) == 0) {
      strcpy(rez, rez + n - i);
      a[n - i] = ch;
      break;
    }
    a[n - i] = ch;
  }
  cout << a;
  k--;
  while (k--) {
    cout << rez;
  }
  cout << '\n';
  return 0;
}
