#include <bits/stdc++.h>
using namespace std;
int ok[200000] = {};
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  string ans;
  for (int i = 'a'; i <= 'z'; ++i) {
    string pre_ans;
    for (int q = 0; q < s.length(); ++q) {
      if ((int)s[q] == i) {
        pre_ans.push_back(s[q]);
        ok[q] = true;
      }
    }
    int cnt = 0;
    for (int j = 0; j < s.length(); ++j) {
      if (ok[j] == false) {
        cnt++;
      } else {
        if (cnt >= n) goto failed_system_test;
        cnt = 0;
      }
    }
    if (cnt >= n) goto failed_system_test;
    sort(ans.begin(), ans.end());
    cout << ans;
    for (int j = 0; j < s.length(); ++j) {
      if ((int)s[j] == i) {
        int winner = 1;
        for (int p = j - 1; p >= 0; --p) {
          if (ok[p] == false)
            winner++;
          else
            break;
        }
        for (int p = j + 1; p < s.length(); ++p) {
          if (ok[p] == false)
            winner++;
          else
            break;
        }
        if (winner >= n) {
          cout << (char)i;
        } else
          ok[j] = false;
      }
    }
    cout << endl;
    return 0;
  failed_system_test:;
    ans += pre_ans;
  }
}
