#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  int max_ans = 0;
  for (int i = 1; i < n; i++) {
    int j = i;
    int f = 0;
    int j1 = 0;
    while (j < n) {
      if (s[j] != s[j1]) {
        f = 1;
        break;
      }
      j++;
      j1++;
    }
    if (f == 0) {
      max_ans = j1;
      break;
    }
  }
  string ans;
  ans = s;
  string a2;
  for (int i = max_ans; i < n; i++) {
    a2 += s[i];
  }
  for (int i = 0; i < k - 1; i++) {
    ans += a2;
  }
  cout << ans << "\n";
  return 0;
}
