#include <bits/stdc++.h>
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  char a[100];
  scanf("%s", a);
  int w = 1, b = n;
  for (int i = 1; i < n; i++) {
    w = 1;
    for (int u = i, j = 0; u < n; u++, j++) {
      if (a[u] != a[j]) {
        w = 0;
        break;
      }
    }
    if (w) {
      b = i;
      break;
    }
  }
  printf("%s", a);
  for (int i = 0; i < k - 1; i++) {
    for (int u = n - b; u < n; u++) {
      printf("%c", a[u]);
    }
  }
}
