#include <bits/stdc++.h>
using namespace std;
vector<int> cnt, rem, now;
int main() {
  int n;
  string s;
  cin >> n >> s;
  int eq = n / 3;
  cnt.resize(3);
  rem.resize(3);
  now.resize(3);
  for (int i = 0; i < n; i++) {
    int cur = s[i] - '0';
    cnt[cur]++;
  }
  for (int i = 0; i < 3; i++) rem[i] = eq - cnt[i];
  for (int i = 0; i < n; i++) {
    int cur = s[i] - '0';
    if (cnt[cur] > eq) {
      int rep = -1;
      for (int i = 0; i < 3 && rep == -1; i++) {
        if (i == cur) continue;
        if (cnt[i] < eq) rep = i;
      }
      if (rep > cur && now[cur] < eq) {
        now[cur]++;
        continue;
      }
      cnt[cur]--;
      cnt[rep]++;
      s[i] = '0' + rep;
    }
  }
  cout << s << endl;
  return 0;
}
