#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  char a[10000], w = 'z';
  scanf("%d%d%s", &n, &k, a + 1);
  for (int i = 1; i <= n; i++) w = min(w, a[i]);
  for (int i = 1; i <= n; i++) cout << w;
}
