#include <bits/stdc++.h>
using namespace std;
int main() {
  int k = 0, n = 0;
  cin >> n >> k;
  string s, ans = "";
  cin >> s;
  ans += s;
  k--;
  while (k--) {
    bool flag = true;
    int i = 0;
    for (i = s.length() - 2; i >= 0; i--) {
      flag = true;
      for (int j = i, p = ans.length() - 1; j >= 0; j--, p--) {
        if (s[j] != ans[p]) flag = false;
      }
      if (flag == true) break;
    }
    for (int j = i + 1; j < s.length(); j++) ans += s[j];
  }
  cout << ans;
  return 0;
}
