#include <bits/stdc++.h>
using namespace std;
int N;
string s;
int pre[26][100000];
int no[26];
int32_t main() {
  ios_base::sync_with_stdio(false);
  if (fopen("cf724d.in", "r")) {
    freopen("cf724d.in", "r", stdin);
    freopen("cf724d.out", "w", stdout);
  }
  cin >> N >> s;
  for (char i = 'a'; i <= 'z'; i++) {
    pre[i - 'a'][0] = (bool)(s[0] <= i);
    for (int j = 1; j < s.length(); j++) {
      pre[i - 'a'][j] = pre[i - 'a'][j - 1] + (bool)(s[j] <= i);
    }
  }
  for (int i = 0; i < 26; i++) {
    bool trash = false;
    if (pre[i][N - 1] == 0) {
      no[i] = pre[i][s.length() - 1];
      if (i) {
        no[i] -= pre[i - 1][s.length() - 1];
      }
      continue;
    }
    for (int j = N; j < s.length(); j++) {
      if (pre[i][j] - pre[i][j - N] == 0) {
        no[i] = pre[i][s.length() - 1];
        if (i) {
          no[i] -= pre[i - 1][s.length() - 1];
        }
        trash = true;
        break;
      }
    }
    if (trash) {
      continue;
    }
    int prevtaken = -1, preval;
    for (int j = 0; j < s.length(); j++) {
      if (j - prevtaken > N) {
        prevtaken = preval;
        no[i]++;
      }
      if (s[j] != 'a' + i) {
        if (s[j] < 'a' + i) {
          prevtaken = j;
        }
        continue;
      }
      preval = j;
    }
    if (s.length() - prevtaken > N) {
      no[i]++;
    }
    break;
  }
  for (int i = 0; i < 26; i++) {
    for (int j = 0; j < no[i]; j++) {
      cout << (char)('a' + i);
    }
  }
  cout << '\n';
  return 0;
}
