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 $2$-nd pair lies inside the $1$-st one, the $3$-rd one — inside the $2$-nd one and so on. For example, nesting depth of "" is $0$, "()()()" is $1$ and "()((())())" is $3$.

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

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


-----Input-----

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

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


-----Output-----

Print single string $t$ of length $n$ consisting of "0"-s and "1"-s. If $t_i$ is equal to 0 then character $s_i$ belongs to RBS $r$, otherwise $s_i$ belongs to $b$.


-----Examples-----
Input
2
()

Output
11

Input
4
(())

Output
0101

Input
10
((()())())

Output
0110001111


-----Note-----

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

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

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

Difficulty: MEDIUM

Solutions:
n = int(input())
s = input()
(red, blue) = (0, 0)
ans = [0 for _ in range(n)]
for (i, item) in enumerate(s):
	if item == '(':
		if red == blue:
			red += 1
			ans[i] = 0
		else:
			blue += 1
			ans[i] = 1
	elif item == ')':
		if red == blue:
			blue -= 1
			ans[i] = 1
		else:
			red -= 1
			ans[i] = 0
print(''.join(list(map(str, ans))))


n = int(input())
r = input()
g = 0
printString = ''
for i in range(n):
	if r[i] == '(':
		printString = printString + str(g % 2)
		g += 1
	else:
		printString = printString + str((g + 1) % 2)
		g -= 1
print(printString)


import sys

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline().strip()

def main():
	n = int(input())
	s = input().strip()
	ans = [0] * n
	ans[0] = 0
	f = 0
	for i in range(1, n):
		if s[i] == s[i - 1]:
			f = 1 - f
		ans[i] = f
	print(*ans, sep='')

def __starting_point():
	main()
__starting_point()


n = int(input())
strng = input().strip()
lst1 = list(strng)
count = 0
lst2 = []
lst3 = []
for i in lst1:
	if i == '(':
		lst2.append(count)
		count += 1
	else:
		count -= 1
		lst2.append(count)
for k in lst2:
	if k % 2 == 0:
		lst3.append('0')
	else:
		lst3.append('1')
print(''.join(lst3))


n = int(input())
s = input()
a = 0
b = 0
p = ''
q = ''
ans = ''
for i in range(n):
	if s[i] == '(':
		if a > b:
			ans += '1'
			b += 1
		else:
			ans += '0'
			a += 1
	elif s[i] == ')':
		if a > b:
			ans += '0'
			a -= 1
		else:
			ans += '1'
			b -= 1
print(ans)


n = int(input())
s = input()
bal = 0
for c in s:
	if c == ')':
		bal -= 1
	print(bal & 1, end='')
	if c == '(':
		bal += 1


n = int(input())
s = input()
color = 0
print(color, end='')
for i in range(1, n):
	if s[i] == s[i - 1]:
		color = 1 - color
	print(color, end='')
print()


n = int(input())
x = list(input())
res = []
flag = True
for j in x:
	if j == '(':
		res.append('0' if flag else '1')
		flag = not flag
	else:
		flag = not flag
		res.append('0' if flag else '1')
print(''.join(res))


n = int(input())
str = input()
tmp = 0
ans = ''
for i in range(len(str)):
	if str[i] == '(':
		if str[i - 1] == '(':
			tmp += 1
	elif str[i - 1] != '(':
		tmp -= 1
	if tmp % 2 == 1:
		ans += '1'
	else:
		ans += '0'
print(ans)


n = int(input())
s = input()
c = 0
for i in range(n):
	if s[i] == '(':
		c += 1
		if c % 2 == 1:
			print('0', end='')
		else:
			print('1', end='')
	else:
		if c % 2 == 1:
			print('0', end='')
		else:
			print('1', end='')
		c -= 1


n = int(input())
st = input()
ans = [0] * n
r = []
s = []
for i in range(n):
	if st[i] == '(':
		if len(r) > len(s):
			s.append(st[i])
			ans[i] = '1'
		else:
			r.append(st[i])
			ans[i] = '0'
	elif len(r) > len(s):
		r.pop()
		ans[i] = '0'
	else:
		s.pop()
		ans[i] = '1'
print(''.join(ans))


n = int(input())
a = input()
ans = [0 for i in range(n)]
k = 0
for i in range(1, n):
	if a[i] == '(':
		ans[i] = k + 1
		k += 1
	else:
		ans[i] = k
		k -= 1
for x in ans:
	print(x % 2, end='')


import sys
input = sys.stdin.readline
n = int(input())
s = input().strip()
clr = []
(s0, s1) = (0, 0)
for x in s:
	if x == '(':
		if s0 <= s1:
			s0 += 1
			clr.append(0)
		else:
			s1 += 1
			clr.append(1)
	elif s0 > s1:
		s0 -= 1
		clr.append(0)
	else:
		s1 -= 1
		clr.append(1)
print(''.join(map(str, clr)))


n = int(input().split()[0])
s = list(map(str, input()))
res = ''
blue = 0
red = 0
for el in s:
	if el == '(':
		if red > blue:
			blue += 1
			res += '1'
		else:
			red += 1
			res += '0'
	elif el == ')':
		if red > blue:
			red -= 1
			res += '0'
		else:
			blue -= 1
			res += '1'
print(res)


import sys
input = sys.stdin.readline
n = int(input())
S = input().strip()
NOW = 0
LIST = []
for s in S:
	if s == '(':
		LIST.append(NOW)
		NOW += 1
	else:
		NOW -= 1
		LIST.append(NOW)
ANS = []
for l in LIST:
	if l % 2 == 0:
		ANS.append('0')
	else:
		ANS.append('1')
print(''.join(ANS))


n = int(input())
ad = 0
bd = 0

def out(x):
	print(x, end='')
for c in input():
	if c == '(':
		if ad > bd:
			bd += 1
			out(1)
		else:
			ad += 1
			out(0)
	elif ad > bd:
		ad -= 1
		out(0)
	else:
		bd -= 1
		out(1)
assert ad == bd == 0


import math
from decimal import Decimal

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)
n = int(input())
a = input()
ans = [0] * n
tc = 0
for i in range(1, n):
	if a[i] == '(':
		ans[i] = tc + 1
		tc += 1
	else:
		ans[i] = tc
		tc -= 1
for i in ans:
	print(i % 2, end='')


n = int(input())
s = input()
ans = ['0' for i in range(n)]
depth = 0
st = []
for i in range(n):
	if s[i] == '(':
		depth += 1
		st.append(i)
	else:
		val = 0
		if depth % 2 == 0:
			val = 1
		x = st[len(st) - 1]
		y = i
		st.pop()
		ans[x] = val
		ans[y] = val
		depth -= 1
print(''.join([str(i) for i in ans]))


n = int(input())
A = input()
stack = []
for i in A:
	if i == '(':
		if len(stack) == 0 or stack[-1] == 1:
			stack.append(0)
			print(0, end='')
		else:
			stack.append(1)
			print(1, end='')
	else:
		print(stack[-1], end='')
		stack.pop()


input()
s = input()
r = b = 0
op = []
ans = []
for c in s:
	if c == '(':
		if r <= b:
			op.append(False)
			r += 1
			ans.append('0')
		else:
			op.append(True)
			b += 1
			ans.append('1')
	elif op.pop():
		b -= 1
		ans.append('1')
	else:
		r -= 1
		ans.append('0')
print(''.join(ans))


n = int(input())
a = input()
(stack, ans) = ([], [])
for q in range(len(a)):
	if a[q] == ')':
		ans.append(stack.pop())
	elif len(stack) > 0 and stack[-1] == '0':
		stack.append('1')
		ans.append('1')
	else:
		stack.append('0')
		ans.append('0')
print(''.join(ans))


n = input()
s = input()
depth = 0
out = []
for c in s:
	if c == '(':
		out.append(str(depth % 2))
		depth += 1
	else:
		depth -= 1
		out.append(str(depth % 2))
print(''.join(out))


n = int(input())
s = input()
d = 0
l = []
for c in s:
	if c == '(':
		l.append(d)
		d ^= 1
	else:
		d ^= 1
		l.append(d)
print(''.join([str(i) for i in l]))


def get_num():
	return int(input())

def print_arr(arr: list):
	for val in arr:
		print(val)

def read_num_list():
	num_str = input()
	return [int(v) for v in num_str.split(' ')]

def read_nums(k):
	lst = []
	for _ in range(k):
		lst.append(get_num())
	return lst
n = get_num()
s = input()
labels = []
l_str = ''
r_str = ''
l_depth = 0
r_depth = 0
for paren in s:
	if paren == '(':
		if l_depth <= r_depth:
			l_depth += 1
			labels.append(0)
		else:
			r_depth += 1
			labels.append(1)
	elif l_depth > r_depth:
		l_depth -= 1
		labels.append(0)
	else:
		r_depth -= 1
		labels.append(1)
print(''.join([str(x) for x in labels]))


n = int(input())
s = input()
count = 0
li = []
for i in range(0, n):
	if s[i] == '(':
		li.append(i % 2)
		print(i % 2, end='')
	else:
		print(li[-1], end='')
		li.pop(-1)


n = int(input())
s = input()
a = ''
count = 0
for i in range(n):
	if s[i] == ')':
		count -= 1
		a += str(count % 2)
	else:
		a += str(count % 2)
		count += 1
print(a)


n = int(input())
s = input()
count = 0
ans = ''
for i in range(n):
	if s[i] == '(':
		if count % 2 == 0:
			ans += '0'
		else:
			ans += '1'
		count += 1
	else:
		count -= 1
		if count % 2 == 0:
			ans += '0'
		else:
			ans += '1'
print(ans)


n = int(input())
string = [str(x) for x in str(input())]
r_score = 0
b_score = 0
answer = ''
for char in range(n):
	cur_char = string[char]
	if cur_char == '(':
		if r_score > b_score:
			b_score += 1
			answer = answer + '1'
		else:
			r_score += 1
			answer = answer + '0'
	elif r_score > b_score:
		r_score -= 1
		answer = answer + '0'
	else:
		b_score -= 1
		answer = answer + '1'
print(answer)


n = int(input())
s = input()
stack = []
a = [1] * n
d = {1: '0', 0: '1'}
out = ['1'] * n
for i in range(n):
	if stack and stack[-1][0] == '(':
		if s[i] == ')':
			a[i] = a[i - 1]
		else:
			a[i] = a[i - 1] + 1
		stack.append([s[i], a[i]])
	else:
		if s[i] == ')':
			a[i] = a[i - 1] - 1
		else:
			a[i] = a[i - 1]
		stack.append([s[i], a[i]])
	out[i] = d[a[i] % 2]
print(''.join(out))


from sys import stdin, stdout
N = int(input())
s = input()
L1 = 0
L2 = 0
ans = [0] * N
for i in range(N):
	if s[i] == '(':
		if L1 <= L2:
			L1 += 1
			ans[i] = 0
		else:
			L2 += 1
			ans[i] = 1
	if s[i] == ')':
		if L1 <= L2:
			L2 -= 1
			ans[i] = 1
		else:
			L1 -= 1
			ans[i] = 0
print(*ans, sep='')


from sys import *
N = int(input())
stack = []
signs = []
S = stdin.readline()
ans = ''
for s in range(N):
	if stack == [] or S[s] == '(':
		stack.append(S[s])
		if signs == []:
			signs.append(0)
		else:
			signs.append(signs[-1] ^ 1)
		ans += str(signs[-1])
	else:
		stack.pop()
		ans += str(signs[-1])
		signs.pop()
print(ans)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from collections import *
from operator import itemgetter, attrgetter
from decimal import *
import bisect
import math
import heapq as hq
MOD = 10 ** 9 + 7

def is_prime(n):
	if n == 2 or n == 3:
		return True
	if n < 2 or n % 2 == 0:
		return False
	if n < 9:
		return True
	if n % 3 == 0:
		return False
	r = int(n ** 0.5)
	f = 5
	while f <= r:
		if n % f == 0:
			return False
		if n % (f + 2) == 0:
			return False
		f += 6
	return True

def pow(a, b, m):
	ans = 1
	while b:
		if b & 1:
			ans = ans * a % m
		b //= 2
		a = a * a % m
	return ans
vis = []
graph = []

def dfs(v):
	if vis[v]:
		return 0
	vis[v] = True
	temp = 0
	for vv in graph[v]:
		temp += dfs(vv)
	return 1 + temp

def ispalindrome(s):
	if s[:] == s[::-1]:
		return 1
	return 0
ans = ''
n = int(input())
s = input()
open = ['0' for i in range(n)]
bal = 0
for i in range(n):
	if s[i] == ')':
		bal -= 1
	open[i] = str(bal % 2)
	if s[i] == '(':
		bal += 1
temp = ''
print(''.join(open))


input()
D = [0, 0]
maxd = 0
for c in input():
	if c == '(':
		(_, i) = min(((D[i], i) for i in range(2)))
		print(i, end='')
		D[i] += 1
		maxd = max(maxd, D[i])
	else:
		(_, i) = max(((D[i], i) for i in range(2)))
		print(i, end='')
		D[i] -= 1
print()


n = int(input())
s = input()
r = []
x = True
for v in s:
	if v == '(':
		r.append('0' if x else '1')
		x = not x
	elif v == ')':
		x = not x
		r.append('0' if x else '1')
print(''.join(r))


N = int(input())
S = input()
T = [0] * N
L = 0
for (i, s) in enumerate(S):
	if s == '(':
		L += 1
		T[i] = L
	else:
		T[i] = L
		L -= 1
print(''.join(['0' if t % 2 else '1' for t in T]))


n = int(input())
s = str(input())
p = []
c = 0
for i in s:
	if i == '(':
		p.append(c % 2)
		c += 1
	else:
		c -= 1
		p.append(c % 2)
print(''.join([str(i) for i in p]))


from collections import deque
n = int(input())
s = input()

def find_max_nesting(s):
	stack = deque()
	curr = 0
	res = []
	for el in s:
		if el == '(':
			stack.append(curr)
			res.append(curr)
			curr = 1 if not curr else 0
		else:
			top_el = stack.pop()
			res.append(top_el)
			curr = 1 if stack and (not stack[-1]) else 0
	return res
res = find_max_nesting(s)
print(''.join(map(str, res)))


n = int(input())
s = str(input())
t = ''
balance = 0
for i in range(n):
	if s[i] == ')':
		balance -= 1
	if balance & 1 == 1:
		t = t + '1'
	else:
		t = t + '0'
	if s[i] == '(':
		balance += 1
print(t)


class Stack:

	def __init__(self, max_size):
		self.stack = [None for i in range(max_size)]
		self.size = 0

	def add(self, val):
		self.stack[self.size] = val
		self.size += 1

	def pop(self):
		val = self.stack[self.size - 1]
		self.size -= 1
		return val

	def empty(self):
		return len(self.stack) == 0

def conv(a):
	if a:
		return '1'
	else:
		return '0'

def solve(a):
	n = len(a)
	st = Stack(200005)
	ans = []
	cur = False
	for x in a:
		if x == '(':
			st.add(cur)
			ans.append(cur)
			cur = not cur
		else:
			val = st.pop()
			ans.append(val)
			cur = bool(val)
	return list(map(conv, ans))
a = input()
a = input()
print(''.join(solve(a)))