#include <bits/stdc++.h>
using namespace std;
void smain();
int main() {
  ios_base::sync_with_stdio(0);
  cout.precision(7);
  cout << fixed;
  smain();
  return 0;
}
int m, n;
char s[200002];
vector<char> res;
bool calc(char x, int l, int r) {
  if (r - l < m) return true;
  vector<int> pos;
  for (int i = l; i < r; ++i)
    if (s[i] == x) pos.push_back(i);
  pos.push_back(r);
  int pr = l - 1, k = (int)pos.size();
  for (int i = 0; i < k; i++) {
    if (pos[i] - pr > m) return false;
    if (i + 1 < k && pos[i + 1] - pr > m) res.push_back(s[pos[i]]), pr = pos[i];
  }
  return true;
}
bool solve(char x) {
  res.clear();
  int pr = -1;
  for (int i = 0; i < n; i++)
    if (s[i] < x) {
      if (!calc(x, pr + 1, i)) return false;
      res.push_back(s[i]);
      pr = i;
    }
  return calc(x, pr + 1, n);
}
void smain() {
  for (; cin >> m >> s;) {
    n = strlen(s);
    for (int i = 0; i < 26; i++)
      if (solve('a' + i)) break;
    sort(res.begin(), res.end());
    for (auto c : res) cout << c;
    cout << endl;
  }
}
