1102_D. Balanced Ternary String
You are given a string s consisting of exactly n characters, and each character is either '0', '1' or '2'. Such strings are called ternary strings.

Your task is to replace minimum number of characters in this string with other characters to obtain a balanced ternary string (balanced ternary string is a ternary string such that the number of characters '0' in this string is equal to the number of characters '1', and the number of characters '1' (and '0' obviously) is equal to the number of characters '2').

Among all possible balanced ternary strings you have to obtain the lexicographically (alphabetically) smallest.

Note that you can neither remove characters from the string nor add characters to the string. Also note that you can replace the given characters only with characters '0', '1' and '2'.

It is guaranteed that the answer exists.

Input

The first line of the input contains one integer n (3 ≤ n ≤ 3 ⋅ 10^5, n is divisible by 3) — the number of characters in s.

The second line contains the string s consisting of exactly n characters '0', '1' and '2'.

Output

Print one string — the lexicographically (alphabetically) smallest balanced ternary string which can be obtained from the given one with minimum number of replacements.

Because n is divisible by 3 it is obvious that the answer exists. And it is obvious that there is only one possible answer.

Examples

Input


3
121


Output


021


Input


6
000000


Output


001122


Input


6
211200


Output


211200


Input


6
120110


Output


120120
```python
from bisect import bisect_left as bl, bisect_right as br, insort
import sys
import heapq
# from math import *
from collections import defaultdict as dd, deque
def data(): return sys.stdin.readline().strip()
def mdata(): return map(int, data().split())
# sys.setrecursionlimit(1000000)
mod = 998244353

n=int(data())
s=data()
s1=list(s)
d={'0':0,'1':0,'2':0}
for i in range(n):
    d[s[i]]+=1
t=n//3
if d['0']<t:
    k='0'
for i in range(n):
    if d[s1[i]]>t:
        for j in sorted(d.keys()):
            if d[j]<t and j<s1[i]:
                d[j]+=1
                d[s1[i]] -= 1
                s1[i]=j
                break
for i in range(n-1,-1,-1):
    if d[s1[i]]>t:
        for j in sorted(d.keys(),reverse=True):
            if d[j]<t and j>s1[i]:
                d[j]+=1
                d[s1[i]] -= 1
                s1[i]=j
                break
print(''.join(s1))
```