#include <bits/stdc++.h>
using namespace std;
inline long long sqr(long long x) { return x * x; }
const int N = 1e5 + 5;
int n, m, cnt[26];
char s[N];
int main() {
  scanf("%d%s", &m, s + 1);
  n = strlen(s + 1);
  for (int i = (1), _b = (n); i <= _b; ++i) ++cnt[s[i] - 'a'];
  for (int i = 0, _a = (26); i < _a; ++i) {
    int cnt2 = 0, last1 = 0, last2 = 0;
    for (int j = (1), _b = (n); j <= _b; ++j) {
      if (s[j] - 'a' < i)
        last1 = j;
      else if (s[j] - 'a' == i)
        last2 = j;
      if (j - last1 == m) {
        if (last2 <= last1) {
          cnt2 = -1;
          break;
        }
        ++cnt2;
        last1 = last2;
      }
    }
    if (cnt2 == -1)
      for (int j = (1), _b = (cnt[i]); j <= _b; ++j)
        printf("%c", (char)(i + 'a'));
    else {
      for (int j = (1), _b = (cnt2); j <= _b; ++j)
        printf("%c", (char)(i + 'a'));
      break;
    }
  }
  return 0;
}
