#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1000000007;
const long long int INF = 1e18;
long long int sub(long long int a, long long int b, long long int p = MOD) {
  return ((a % p) - (b % p) + p) % p;
}
long long int mult(long long int a, long long int b, long long int p = MOD) {
  return ((a % p) * (b % p)) % p;
}
long long int add(long long int a, long long int b, long long int p = MOD) {
  return (a % p + b % p) % p;
}
long long int fpow(long long int n, long long int k, long long int p = MOD) {
  long long int r = 1;
  while (k > 0) {
    if (k & 1) r = r * n % p;
    n = n * n % p;
    k = k >> 1;
  }
  return r;
}
long long int inv(long long int a, long long int p = MOD) {
  return fpow(a, p - 2, p);
}
unsigned long long int I1018 = 1000000000000000000;
const unsigned long long int I10e5 = 100000;
const long long int I10e6 = 1e6;
long long int ZERO = 0;
unsigned long long int I10e9 = 1000000000;
long long int ONE = 1;
void printVecpll(std::vector<pair<long long int, long long int> > v) {
  for (auto p : v) {
    cout << p.first << " " << p.second << endl;
  }
}
void printVec(std::vector<long long int> v) {
  for (long long int i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  cout << endl;
}
std::vector<long long int> read_vec(long long int n) {
  long long int i;
  std::vector<long long int> v(n);
  for (i = 0; i < n; i++) {
    cin >> v[i];
  }
  return v;
}
void print_um(unordered_map<long long int, long long int> m) {
  for (pair<long long int, long long int> p : m) {
    cout << p.first << " " << p.second << endl;
  }
}
std::vector<bool> is_prime;
std::vector<long long int> primes;
void sieve(long long int n) {
  is_prime.resize(n + 2, true);
  primes.clear();
  long long int p;
  for (p = 2; p * p <= n; p++) {
    if (is_prime[p]) {
      long long int i;
      for (i = p * p; i <= n; i += p) {
        is_prime[i] = false;
      }
    }
  }
  is_prime[0] = is_prime[1] = false;
  long long int i;
  for (i = 2; i <= n; i++) {
    if (is_prime[i]) {
      primes.emplace_back(i);
    }
  }
}
long long int n;
string s;
map<char, long long int> cnt;
void pref(char x) {
  long long int i;
  for (i = 0; i < n; i++) {
    if (cnt[x] < n / 3 && s[i] > x && cnt[s[i]] > n / 3) {
      cnt[x] += 1;
      cnt[s[i]]--;
      s[i] = x;
    }
  }
}
void suff(char x) {
  long long int i;
  for (i = n - 1; i >= 0; i--) {
    if (cnt[x] < n / 3 && s[i] < x && cnt[s[i]] > n / 3) {
      cnt[x]++;
      cnt[s[i]]--;
      s[i] = x;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  cin >> s;
  for (char c : s) {
    cnt[c]++;
  }
  pref('0');
  pref('1');
  suff('2');
  suff('1');
  cout << s << endl;
  return 0;
}
