#include <bits/stdc++.h>
using namespace std;
const long long fx[] = {+0, +0, +1, -1, -1, +1, -1, +1};
const long long fy[] = {-1, +1, +0, +0, +1, +1, -1, -1};
long long Set(long long N, long long pos) { return N = N | (1 << pos); }
long long reset(long long N, long long pos) { return N = N & ~(1 << pos); }
bool check(int N, int pos) { return (bool)(N & (1 << pos)); }
deque<char> q;
deque<pair<int, char> > ok;
map<char, int> mp;
bool cmp(pair<int, char> p1, pair<int, char> p2) {
  if (p1.first > p2.first)
    return 1;
  else if (p1.first == p2.first) {
    if (p1.second > p2.second)
      return 1;
    else
      return 0;
  } else
    return 0;
}
int main() {
  int n;
  scanf("%d", &n);
  string str, ans = "";
  cin >> str;
  for (int i = 0; i < n; i++) {
    mp[str[i]]++;
  }
  vector<pair<int, char> > arr;
  for (char x = 'a'; x <= 'z'; x++) {
    if (mp[x] == 0) continue;
    arr.push_back(make_pair(mp[x], x));
  }
  sort(arr.begin(), arr.end(), cmp);
  for (int i = 0; i < arr.size(); i++) {
    for (int j = 0; j < arr[i].first; j++) {
      ans += arr[i].second;
    }
  }
  cout << ans << endl;
  return 0;
}
