#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  string s;
  cin >> n >> m >> s;
  unordered_set<string> map;
  string pre = "";
  for (auto i : s) {
    pre += i;
    map.insert(pre);
  }
  pre = "";
  int pos = -1;
  for (int i = n - 1; i > 0; --i) {
    pre = s[i] + pre;
    if (map.find(pre) != map.end()) {
      pos = i;
    }
  }
  string ans = "";
  if (pos == -1) {
    for (int i = 0; i < m; ++i) ans += s;
  } else {
    pre = s.substr(0, pos);
    for (int i = 0; i < m; ++i) ans += pre;
    ans += s.substr(pos);
  }
  cout << ans << endl;
}
