#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string h;
  cin >> h;
  int l = h.length();
  vector<int> can(l, 0);
  for (char i = 'a'; i <= 'z'; i++) {
    for (int j = 0; j < l; j++)
      if (h[j] == i) can[j] = 1;
    int last = -1;
    int flag = 0;
    for (int j = 0; j < l; j++) {
      if ((can[j] == 1) || (h[j] == i)) last = j;
      if (last + n <= j) flag = 1;
    }
    if (flag == 0) {
      last = -1;
      int li = -1;
      for (int j = 0; j < l; j++) {
        if (can[j] == 1) {
          if (h[j] != i)
            last = j;
          else {
            li = j;
            can[j] = 0;
          }
        }
        if (last + n <= j) {
          last = li;
          can[li] = 1;
        }
      }
      vector<char> x;
      for (int j = 0; j < l; j++) {
        if (can[j] == 1) x.push_back(h[j]);
      }
      sort(x.begin(), x.end());
      for (int j = 0; j < x.size(); j++) {
        cout << x[j];
      }
      return 0;
    }
  }
}
