#include <bits/stdc++.h>
using namespace std;
map<char, long long> cnt;
map<char, long long> kam;
map<char, long long> banane;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long i, j, n;
  string s, ss;
  cin >> n >> s;
  ss = s;
  for (i = 0; i < n; i++) {
    cnt[s[i]]++;
  }
  kam['0'] = n / 3 - cnt['0'];
  kam['1'] = n / 3 - cnt['1'];
  kam['2'] = n / 3 - cnt['2'];
  for (i = 0; i < n; i++) {
    if (kam[s[i]] < 0) {
      for (auto it : kam) {
        if (it.second > 0 and it.first < s[i]) {
          ss[i] = it.first;
          kam[s[i]]++;
          kam[it.first]--;
          break;
        }
      }
    } else {
    }
  }
  for (i = n - 1; i >= 0; i--) {
    if (kam[s[i]] < 0) {
      for (auto it = kam.rbegin(); it != kam.rend(); it++) {
        if ((*it).second > 0) {
          ss[i] = (*it).first;
          kam[(*it).first]--;
          kam[s[i]]++;
          break;
        }
      }
    }
  }
  cout << ss;
  return 0;
}
