#include <bits/stdc++.h>
const int inf = (1 << 30);
const int mod = 1000000007;
using ll = long long;
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  string str;
  cin >> str;
  char c_min = 'z';
  for (char c : str) c_min = min(c, c_min);
  string ans = "";
  while (n--) {
    ans += c_min;
  }
  cout << ans << endl;
  return 0;
}
