#include <bits/stdc++.h>
using namespace std;
char s[300005];
int a[4], t[4];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> s;
  m = n / 3;
  for (int i = 0; i < n; ++i) ++a[s[i] - '0'];
  a[0] -= m, a[1] -= m, a[2] -= m;
  for (int i = 0; i < n; ++i) {
    int x = s[i] - '0';
    if (a[x] <= 0) {
      cout << x;
      ++t[x];
      continue;
    }
    for (int j = 0; j < 3; ++j)
      if (a[j] < 0) {
        if (j > x) {
          if (t[x] < m) {
            ++t[x];
            cout << x;
            break;
          }
        }
        cout << j;
        ++a[j], --a[x];
        break;
      }
  }
  return 0;
}
