#P1167D. Bicolored RBS

    ID: 2499 Type: RemoteJudge 2000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>constructive algorithmsgreedy*1500

Bicolored RBS

No submission language available for this problem.

Description

A string is called bracket sequence if it does not contain any characters other than "(" and ")". A bracket sequence is called regular (shortly, RBS) if it is possible to obtain correct arithmetic expression by inserting characters "+" and "1" into this sequence. For example, "", "(())" and "()()" are RBS and ")(" and "(()" are not.

We can see that each opening bracket in RBS is paired with some closing bracket, and, using this fact, we can define nesting depth of the RBS as maximum number of bracket pairs, such that the 22-nd pair lies inside the 11-st one, the 33-rd one — inside the 22-nd one and so on. For example, nesting depth of "" is 00, "()()()" is 11 and "()((())())" is 33.

Now, you are given RBS ss of even length nn. You should color each bracket of ss into one of two colors: red or blue. Bracket sequence rr, consisting only of red brackets, should be RBS, and bracket sequence, consisting only of blue brackets bb, should be RBS. Any of them can be empty. You are not allowed to reorder characters in ss, rr or bb. No brackets can be left uncolored.

Among all possible variants you should choose one that minimizes maximum of rr's and bb's nesting depth. If there are multiple solutions you can print any of them.

The first line contains an even integer nn (2n21052 \le n \le 2 \cdot 10^5) — the length of RBS ss.

The second line contains regular bracket sequence ss (s=n|s| = n, si{s_i \in \{"(", ")"}\}).

Print single string tt of length nn consisting of "0"-s and "1"-s. If tit_i is equal to 0 then character sis_i belongs to RBS rr, otherwise sis_i belongs to bb.

Input

The first line contains an even integer nn (2n21052 \le n \le 2 \cdot 10^5) — the length of RBS ss.

The second line contains regular bracket sequence ss (s=n|s| = n, si{s_i \in \{"(", ")"}\}).

Output

Print single string tt of length nn consisting of "0"-s and "1"-s. If tit_i is equal to 0 then character sis_i belongs to RBS rr, otherwise sis_i belongs to bb.

Samples

Sample Input 1

2
()

Sample Output 1

11

Sample Input 2

4
(())

Sample Output 2

0101

Sample Input 3

10
((()())())

Sample Output 3

0110001111

Note

In the first example one of optimal solutions is s=s = "()\color{blue}{()}". rr is empty and b=b = "()()". The answer is max(0,1)=1\max(0, 1) = 1.

In the second example it's optimal to make s=s = "(())\color{red}{(}\color{blue}{(}\color{red}{)}\color{blue}{)}". r=b=r = b = "()()" and the answer is 11.

In the third example we can make s=s = "((()())())\color{red}{(}\color{blue}{((}\color{red}{)()}\color{blue}{)())}". r=r = "()()()()" and b=b = "(()())(()())" and the answer is 22.