#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  string s;
  cin >> n >> s;
  int freq[3] = {0};
  int fin = n / 3;
  for (int i = 0; i < n; i++) {
    freq[s[i] - '0']++;
  }
  for (int i = 0; i < n; i++) {
    if (freq[s[i] - '0'] <= fin) continue;
    for (int j = 0; j < s[i] - '0'; j++) {
      if (freq[j] >= fin) continue;
      freq[s[i] - '0']--;
      s[i] = j + '0';
      freq[j]++;
      break;
    }
  }
  for (int i = n - 1; i >= 0; i--) {
    if (freq[s[i] - '0'] <= fin) continue;
    for (int j = 2; j >= 0; j--) {
      if (freq[j] >= fin || j == s[i] - '0') continue;
      freq[s[i] - '0']--;
      s[i] = j + '0';
      freq[j]++;
      break;
    }
  }
  cout << s;
  return 0;
}
