#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  char a[55], b[3000];
  scanf("%s", a);
  memset(b, 0, sizeof(b));
  int e = 1;
  int i = 0;
  while (k) {
    int ok = 1;
    for (int j = 0; j < n; j++) {
      if (b[i + j] == a[j]) {
        continue;
      } else if (b[i + j] == 0) {
        b[i + j] = a[j];
      } else {
        ok = 0;
        break;
      }
    }
    i++;
    if (ok) k--;
  }
  printf("%s\n", b);
}
