#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300005;
const int inf = 2147483647;
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    x = (x << 3) + (x << 1) + (ch ^ 48), ch = getchar();
  return x * f;
}
int n;
char ch[MAXN], ans[MAXN];
int cal[5], cnt[5], s[3][MAXN];
bool ok[MAXN];
int main() {
  n = read();
  int g = n / 3;
  scanf("%s", ch + 1);
  for (int i = 1; i <= n; i++) {
    cal[ch[i] - '0']++;
  }
  for (int i = 1; i <= n; i++) {
    int c = ch[i] - '0';
    if (cal[c] <= g)
      printf("%c", ch[i]), cnt[c]++;
    else {
      if (cnt[c] < g && c == 0)
        printf("%c", ch[i]), cnt[c]++;
      else if (cnt[c] < g && c == 1 && (cnt[0] == g || cal[0] >= g))
        printf("%c", ch[i]), cnt[c]++;
      else {
        if (cal[0] < g && cnt[0] < g)
          putchar('0'), cnt[0]++, cal[0]++;
        else if (cal[1] < g && cnt[1] < g)
          putchar('1'), cnt[1]++, cal[1]++;
        else if (cal[2] < g && cnt[2] < g)
          putchar('2'), cnt[2]++, cal[2]++;
        cal[c]--;
      }
    }
  }
  return 0;
}
