#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 100;
const int MOD = 1e9 + 7;
const int seed = 1331;
char A[maxn];
char C[maxn];
int B[maxn];
int main() {
  int n, m;
  m = 0;
  int i, j, k;
  scanf("%d", &n);
  scanf("%s", A + 1);
  int l = strlen(A + 1);
  int a = 'z' + 1, b;
  for (i = 'a'; i <= 'z'; i++) {
    m = 0;
    for (j = 1; j <= l; j++)
      if (A[j] <= i) B[m++] = j;
    bool flag = true;
    if (m == 0 || B[0] > n || l - n >= B[m - 1]) flag = false;
    for (j = 0; j < m - 1 && flag; j++)
      if (B[j + 1] - B[j] > n) {
        flag = false;
        break;
      }
    if (flag) break;
  }
  m = 0;
  for (j = 1; j <= l; j++)
    if (A[j] <= i) C[m] = A[j], B[++m] = j;
  k = 0;
  for (j = 1; j <= m; j++) {
    if (A[B[j]] == i) {
      int c = l + 1;
      if (j + 1 <= m) c = B[j + 1];
      int cc = 0;
      if (k != 0) cc = B[k];
      if (c - cc <= n) continue;
    }
    B[++k] = B[j];
  }
  m = k;
  for (i = 1; i <= m; i++) C[i - 1] = A[B[i]];
  C[m] = '\0';
  sort(C, C + m);
  puts(C);
  return 0;
}
