#include <bits/stdc++.h>
using namespace std;
int n, a[300000], todo[3][3];
string s;
pair<int, int> num[3];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  cin >> s;
  for (int i = 0; i < n; i++) a[i] = s[i] - '0';
  for (int i = 0; i < n; i++) num[a[i]].first++;
  for (int i = 0; i < 3; i++) num[i].second = i;
  for (int i = 0; i < 3; i++) todo[i][i] = min(num[i].first, n / 3);
  sort(num, num + 3);
  if (num[1].first < n / 3) {
    todo[num[2].second][num[0].second] = n / 3 - num[0].first;
    todo[num[2].second][num[1].second] = n / 3 - num[1].first;
  } else {
    todo[num[1].second][num[0].second] = num[1].first - n / 3;
    todo[num[2].second][num[0].second] = num[2].first - n / 3;
  }
  for (int i = 0; i < n; i++) {
    int j = 0;
    while (todo[a[i]][j] == 0) j++;
    cout << j;
    todo[a[i]][j]--;
  }
  return 0;
}
