#include <bits/stdc++.h>
using namespace std;
int oo = (1e9) + 7;
int n;
string s;
int cnt[3];
int main() {
  cin >> n >> s;
  deque<int> v[3];
  for (size_t i = 0; i < s.size(); i++) {
    cnt[s[i] - '0']++;
    v[s[i] - '0'].push_back((int)i);
  }
  int resp = (cnt[0] + cnt[1] + cnt[2]) / 3;
  for (int i = 0; i <= 2; i++) {
    while ((int)v[i].size() > resp) {
      if (i == 0) {
        if (cnt[2] < resp)
          s[v[0].back()] = '2', cnt[2]++, v[0].pop_back();
        else if (cnt[1] < resp)
          s[v[0].back()] = '1', cnt[1]++, v[0].pop_back();
      } else if (i == 1) {
        if (cnt[0] < resp)
          s[v[1].front()] = '0', cnt[0]++, v[1].pop_front();
        else if (cnt[2] < resp)
          s[v[1].back()] = '2', cnt[2]++, v[1].pop_back();
      } else {
        if (cnt[0] < resp)
          s[v[2].front()] = '0', cnt[0]++, v[2].pop_front();
        else if (cnt[1] < resp)
          s[v[2].front()] = '1', cnt[1]++, v[2].pop_front();
      }
    }
  }
  cout << s;
  return 0;
}
