#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long k;
  string s;
  cin >> n >> k >> s;
  string copy = s;
  sort(copy.begin(), copy.end());
  for (int i = 0; i < n; i++) {
    cout << copy[0];
  }
}
