#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  char s[301013];
  scanf("%d %s", &n, s);
  s[n] = 0;
  int t[3] = {0, 0, 0};
  for (int i = 0; i < n; i++) t[s[i] - '0']++;
  for (int i = 0; i < n; i++) {
    if (t[s[i] - '0'] > n / 3) {
      for (int j = '0'; j < s[i]; j++)
        if (t[j - '0'] < n / 3) {
          t[s[i] - '0']--;
          t[j - '0']++;
          s[i] = j;
          break;
        }
    }
  }
  for (int i = n - 1; i >= 0; i--) {
    if (t[s[i] - '0'] > n / 3) {
      for (int j = '2'; j > s[i]; j--)
        if (t[j - '0'] < n / 3) {
          t[s[i] - '0']--;
          t[j - '0']++;
          s[i] = j;
          break;
        }
    }
  }
  puts(s);
  return 0;
}
