/*
    Bismillahir Rahmanir Raheem
    Think Twice Code Once
    author : reaziii
*/
#include<bits/stdc++.h>
#define sc(x)        scanf("%lld",&x)
#define pcase(x)     printf("Case %d: ",x++)
#define pn           printf("\n")
#define fri(f)       for(int i=0;i<f;i++)
#define frj(f)       for(int j=0;j<f;j++)
#define reset(x,e)   memset(x,e,sizeof(x))
#define all(x)       x.begin(),x.end()
#define input        freopen("input.txt","r",stdin);
#define output       freopen("output.txt","w",stdout)
#define infi         INT_MAX
#define m_v          3000000
#define pii          pair<int,int>
#define pch          pair<char,char>
#define pll          pair<ll,ll>
#define mgraph       map<int,vector<int> >
#define mp           make_pair
#define pb           push_back
#define clr(x)       memset(x,0,sizeof(x))
#define frx(x,y)     for(int x=0;x<y;x++)
#define ff           first
#define ss           second
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
bool checkbitt(ll num, int pos);
ll setbitt(ll num, ll pos);
ll resetbitt(ll num, int pos);

//.................___Start from here___.................//
//.................._____________________................//

int solve() {
	int n;
	cin >> n;
	stack<int> pos;
	int nest[n];
	string s;
	cin >> s;
	int p  = 0;
	int mxp = 0;
	int i = 0;
	for (auto x : s) {
		if (x == '(') p++, pos.push(i);
		else p--, nest[pos.top()] = i, pos.pop();
		mxp = max(mxp, p);
		i++;
	}
	int color[n];
	clr(color);
	fri(n) {
		if (s[i] == ')' && s[i - 1] == '(') {
			color[i] = 1;
			color[i - 1] = 1;
		}
		// else color[i] = 2;
	}

	int mx = ceil(mxp / 2.0);
	mx--;

	for (int i = 0; i < n && mx; i++) {
		if (s[i] == '(' && color[i] != 1) {
			color[i] = 1;
			color[nest[i]] = 1;
		}
		mx--;
	}

	for (auto x : color) cout << x;
	cout << endl;

	return 0;
}
int main() {
#ifndef ONLINE_JUDGE
	input;
	output;
#endif
	int cs = 1;
	int cn = 1;
	//cin>>cs;
	while (cs--) {
		solve();

	}
}

bool checkbitt(ll num, int pos) {return (num >> pos) & 1;}
ll setbitt(ll num, ll pos) {return (1 << pos) | num;}
ll resetbitt(ll num, int pos) {if (!checkbitt(num, pos)) return num; else return (1 << pos)^num;}


#include <bits/stdc++.h>
using namespace std ;
#define ll long long int
#define pb push_back
#define ff first
#define dobara(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
#define ss second
#define S(x) scanf("%d",&x)
#define SL(x) scanf("%lld",&x)
#define M 1000000007
#define sz(x) (int)x.size()
#define all(a) (a).begin(),(a).end()
char res[200005] , open[200005] , close[200005] , num[200005] ;

int main(){
	int n ;
	string s ;
	cin>>n>>s ;

	int ans = 0 , L , R , l = 0 , r = 0 , cnt = 0 , mxmcnt = 0 ;

	for(int i=0;i<n;i++){
		if(s[i] == '('){
			cnt++ ;
			mxmcnt = max(mxmcnt , cnt) ;
			r++ ;
		}
		else{
			cnt-- ;
			r++  ;
		}

		if(cnt == 0){
           if(ans < mxmcnt){
              L = l  ;
              R = r-1 ;
              ans = mxmcnt ;
           }
           l = i + 1 ;
           r = i + 1 ;
		}
		num[i] = cnt ;
	}

	int zero , one  ;

	zero = mxmcnt/2 ;

	if(mxmcnt%2){
		zero++ ;
	}

	one = mxmcnt - zero  ;
    //cout<<zero<<" "<<one<<endl;
	//string res="" ;
    for(int i=0;i<n;i++){
    	res[i] = 'n' ;
    }

	int flg = 0   ;
	cnt = mxmcnt ;
	//cout<<L<<" "<<R<<endl;

   // nr = nl + 1 ;
    int cnt1 = 0 ;
    while(1){
    	cnt1++ ;
    	if(cnt1 > one){
    		break ;
    	}
    	open[cnt] = 1 ;
    	close[cnt - 1] = 1 ;
    	//cout<<cnt<<" "<<cnt-1<<endl;
    	cnt-- ;
    }

    for(int i=0;i<n;i++){
    	if(s[i] == '(' && open[num[i]]){
    		res[i] = '1' ;
    	}
    	else if(s[i] == ')' && close[num[i]]){
    		res[i] = '1' ;
    	}
    }
    for(int i=0;i<n;i++){
    	if(res[i] == 'n'){
    		res[i] = '0' ;
    	}
    }

	for(int i=0;i<n;i++){
		cout<<res[i] ;
	}
}


#include <bits/stdc++.h>
using namespace std ;
#define ll long long int
#define pb push_back
#define ff first
#define dobara(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
#define ss second
#define S(x) scanf("%d",&x)
#define SL(x) scanf("%lld",&x)
#define M 1000000007
#define sz(x) (int)x.size()
#define all(a) (a).begin(),(a).end()
char res[200005] ;
int main(){
	int n ;
	string s ;
	cin>>n>>s ;

	int ans = 0 , L , R , l = 0 , r = 0 , cnt = 0 , mxmcnt = 0 ;

	for(int i=0;i<n;i++){
		if(s[i] == '('){
			cnt++ ;
			mxmcnt = max(mxmcnt , cnt) ;
			r++ ;
		}
		else{
			cnt-- ;
			r++  ;
		}

		if(cnt == 0){
           if(ans < mxmcnt){
              L = l  ;
              R = r-1 ;
              ans = mxmcnt ;
           }
           l = i + 1 ;
           r = i + 1 ;
		}
	}

	int zero , one  ;

	zero = mxmcnt/2 ;

	if(mxmcnt%2){
		zero++ ;
	}

	one = mxmcnt - zero  ;

	//string res="" ;
    for(int i=0;i<n;i++){
    	res[i] = 'n' ;
    }
	for(int i=0;i<L;i++){
		res[i] = '0' ;
	}

	int flg = 0 , open = 0 , close = 0  ;
	cnt = 0 ;
	//cout<<L<<" "<<R<<endl;
	for(int i=L;i<=R;i++){
       if(s[i] == '(' && open < zero){
       	res[i] = '0' ;
       	cnt++ ;
       	//cout<<res[i]<<endl;
       	//cout<<i<<endl;
       	open++ ;
       }
       else if(s[i] == ')') {
       	res[i] = '0' ;
       	cnt-- ;
       	//cout<<i<<endl;
       	//close++ ;
       	open-- ;
       }
       if(cnt == 0){
          break ;
       }
	}
	for(int i=R+1;i<n;i++){
		res[i] = '0' ;
	}
	for(int i=L;i<=R;i++){
		if(res[i] == 'n'){
			res[i] = '1' ;
		}
	}
	for(int i=0;i<n;i++){
		cout<<res[i] ;
	}
}


#include <bits/stdc++.h>
using namespace std ;
#define ll long long int
#define pb push_back
#define ff first
#define dobara(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
#define ss second
#define S(x) scanf("%d",&x)
#define SL(x) scanf("%lld",&x)
#define M 1000000007
#define sz(x) (int)x.size()
#define all(a) (a).begin(),(a).end()
char res[200005] ;
int main(){
	int n ;
	string s ;
	cin>>n>>s ;

	int ans = 0 , L , R , l = 0 , r = 0 , cnt = 0 , mxmcnt = 0 ;

	for(int i=0;i<n;i++){
		if(s[i] == '('){
			cnt++ ;
			mxmcnt = max(mxmcnt , cnt) ;
			r++ ;
		}
		else{
			cnt-- ;
			r++  ;
		}

		if(cnt == 0){
           if(ans < mxmcnt){
              L = l  ;
              R = r-1 ;
              ans = mxmcnt ;
           }
           l = i + 1 ;
           r = i + 1 ;
		}
	}

	int zero , one  ;

	zero = mxmcnt/2 ;

	if(mxmcnt%2){
		zero++ ;
	}

	one = mxmcnt - zero  ;

	//string res="" ;
    for(int i=0;i<n;i++){
    	res[i] = 'n' ;
    }
	for(int i=0;i<L;i++){
		res[i] = '0' ;
	}

	int flg = 0 , open = 0 , close = 0  ;
	cnt = 0 ;
	//cout<<L<<" "<<R<<endl;
	for(int i=L;i<=R;i++){
       if(s[i] == '(' && open < zero){
       	res[i] = '0' ;
       	cnt++ ;

       	open++ ;
       }
       else if(s[i] == ')' && close < open) {
       	res[i] = '0' ;
       	cnt-- ;
       	open-- ;
       	close++ ;
       }
       if(cnt == 0){
          break ;
       }
	}
	for(int i=R+1;i<n;i++){
		res[i] = '0' ;
	}
	for(int i=L;i<=R;i++){
		if(res[i] == 'n'){
			res[i] = '1' ;
		}
	}
	for(int i=0;i<n;i++){
		cout<<res[i] ;
	}
}


#include <bits/stdc++.h>
using namespace std ;
#define ll long long int
#define pb push_back
#define ff first
#define dobara(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
#define ss second
#define S(x) scanf("%d",&x)
#define SL(x) scanf("%lld",&x)
#define M 1000000007
#define sz(x) (int)x.size()
#define all(a) (a).begin(),(a).end()
char res[200005]  ;
int open[200005] , close[200005] , num[200005] ;

int main(){
	int n ;
	string s ;
	cin>>n>>s ;

	int ans = 0 , L , R , l = 0 , r = 0 , cnt = 0 , mxmcnt = 0 ;

	for(int i=0;i<n;i++){
		if(s[i] == '('){
			cnt++ ;
			mxmcnt = max(mxmcnt , cnt) ;
			r++ ;
		}
		else{
			cnt-- ;
			r++  ;
		}

		if(cnt == 0){
           if(ans < mxmcnt){
              L = l  ;
              R = r-1 ;
              ans = mxmcnt ;
           }
           l = i + 1 ;
           r = i + 1 ;
		}
		num[i] = cnt ;
	}

	int zero , one  ;

	zero = mxmcnt/2 ;

	if(mxmcnt%2){
		zero++ ;
	}

	one = mxmcnt - zero  ;
    //cout<<zero<<" "<<one<<endl;
	//string res="" ;
    for(int i=0;i<n;i++){
    	res[i] = 'n' ;
    }

	int flg = 0   ;
	cnt = mxmcnt ;
	//cout<<L<<" "<<R<<endl;

   // nr = nl + 1 ;
    int cnt1 = 0 ;
    while(1){
    	cnt1++ ;
    	if(cnt1 > one){
    		break ;
    	}
    	open[cnt] = 1 ;
    	close[cnt - 1] = 1 ;
    	//cout<<cnt<<" "<<cnt-1<<endl;
    	cnt-- ;
    }

    for(int i=0;i<n;i++){
    	if(s[i] == '(' && open[num[i]]){
    		res[i] = '1' ;
    	}
    	else if(s[i] == ')' && close[num[i]]){
    		res[i] = '1' ;
    	}
    }
    for(int i=0;i<n;i++){
    	if(res[i] == 'n'){
    		res[i] = '0' ;
    	}
    }

	for(int i=0;i<n;i++){
		cout<<res[i] ;
	}
}


#include <bits/stdc++.h>
using namespace std ;
#define ll long long int
#define pb push_back
#define ff first
#define dobara(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
#define ss second
#define S(x) scanf("%d",&x)
#define SL(x) scanf("%lld",&x)
#define M 1000000007
#define sz(x) (int)x.size()
#define all(a) (a).begin(),(a).end()
char res[200005] ;
int main(){
	int n ;
	string s ;
	cin>>n>>s ;

	int ans = 0 , L , R , l = 0 , r = 0 , cnt = 0 , mxmcnt = 0 ;

	for(int i=0;i<n;i++){
		if(s[i] == '('){
			cnt++ ;
			mxmcnt = max(mxmcnt , cnt) ;
			r++ ;
		}
		else{
			cnt-- ;
			r++  ;
		}

		if(cnt == 0){
           if(ans < mxmcnt){
              L = l  ;
              R = r-1 ;
              ans = mxmcnt ;
           }
           l = i + 1 ;
           r = i + 1 ;
		}
	}

	int zero , one  ;

	zero = mxmcnt/2 ;

	if(mxmcnt%2){
		zero++ ;
	}

	one = mxmcnt - zero  ;

	//string res="" ;
    for(int i=0;i<n;i++){
    	res[i] = 'n' ;
    }
	for(int i=0;i<L;i++){
		res[i] = '0' ;
	}

	int flg = 0 , open = 0 , close = 0  ;
	cnt = 0 ;
	//cout<<L<<" "<<R<<endl;
	for(int i=L;i<=R;i++){
       if(s[i] == '(' && open < zero){
       	res[i] = '0' ;
       	cnt++ ;
       	//cout<<res[i]<<endl;
       	//cout<<i<<endl;
       	open++ ;
       }
       else if(s[i] == ')' && close < zero) {
       	res[i] = '0' ;
       	cnt-- ;
       	//cout<<i<<endl;
       	//close++ ;
       	open-- ;
       	close++ ;
       }
       if(cnt == 0){
          break ;
       }
	}
	for(int i=R+1;i<n;i++){
		res[i] = '0' ;
	}
	for(int i=L;i<=R;i++){
		if(res[i] == 'n'){
			res[i] = '1' ;
		}
	}
	for(int i=0;i<n;i++){
		cout<<res[i] ;
	}
}


#include <bits/stdc++.h>
using namespace std ;
#define ll long long int
#define pb push_back
#define ff first
#define dobara(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
#define ss second
#define S(x) scanf("%d",&x)
#define SL(x) scanf("%lld",&x)
#define M 1000000007
#define sz(x) (int)x.size()
#define all(a) (a).begin(),(a).end()
char res[200005]  ;
int open[200005] , close[200005] , num[200005] ;

int main(){
	int n ;
	string s ;
	cin>>n>>s ;

	int ans = 0 , L , R , l = 0 , r = 0 , cnt = 0 , mxmcnt = 0 ;

	for(int i=0;i<n;i++){
		if(s[i] == '('){
			cnt++ ;
			mxmcnt = max(mxmcnt , cnt) ;
			r++ ;
		}
		else{
			cnt-- ;
			r++  ;
		}

		if(cnt == 0){
           if(ans < mxmcnt){
              L = l  ;
              R = r-1 ;
              ans = mxmcnt ;
           }
           l = i + 1 ;
           r = i + 1 ;
		}
		num[i] = cnt ;
	}

	int zero , one  ;

	zero = mxmcnt/2 ;

	if(mxmcnt%2){
		zero++ ;
	}

	one = mxmcnt - zero  ;
    cout<<zero<<" "<<one<<endl;
	//string res="" ;
    for(int i=0;i<n;i++){
    	res[i] = 'n' ;
    }

	int flg = 0   ;
	cnt = mxmcnt ;
	//cout<<L<<" "<<R<<endl;

   // nr = nl + 1 ;
    int cnt1 = 0 ;
    while(1){
    	cnt1++ ;
    	if(cnt1 > one){
    		break ;
    	}
    	open[cnt] = 1 ;
    	close[cnt - 1] = 1 ;
    	//cout<<cnt<<" "<<cnt-1<<endl;
    	cnt-- ;
    }

    for(int i=0;i<n;i++){
    	if(s[i] == '(' && open[num[i]]){
    		res[i] = '1' ;
    	}
    	else if(s[i] == ')' && close[num[i]]){
    		res[i] = '1' ;
    	}
    }
    for(int i=0;i<n;i++){
    	if(res[i] == 'n'){
    		res[i] = '0' ;
    	}
    }

	for(int i=0;i<n;i++){
		cout<<res[i] ;
	}
}


/*** 	short int -> 2 bytes
	for scanning short int use %hd format specifier
	for printing short int use %i or %d format specifier
	The diagonals of parallelogram intersect each other in the middle.
***/
/***
	for taking input from file use ./a.out < input.txt
	for printing output to file use ./a.out > output.txt
***/
/***
	Always use printf/scanf for I/O
***/
/***
	Think twice code once..
	check the result by developing test cases on your own before submitting the code.
***/
#include<bits/stdc++.h>
using namespace std;
#define all(v) v.begin(),v.end()
#define S(v) sort(v.begin(),v.end())
#define pb push_back
#define ppb pop_back
#define MOD (ll)(1e9+7)
#define f first
#define s second
#define max3(a,b,c) max(max(a,b),c)
#define min3(a,b,c) min(min(a,b),c)
#define INF LLONG_MAX
#define NINF LLONG_MIN
#define sc(n) scanf("%lld",&n)
#define pr(n) printf("%lld ",n)
#define endl '\n'
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
typedef long long int ll;
typedef long long unsigned llu;
typedef long double ld;
class Compare
{
	public:
	bool operator() (const pair<ll,pair<ll,ll>> &p1,const pair<ll,pair<ll,ll>> &p2) const
	{
		if(p1.f>p2.f)
			return true;
		else if(p1.f==p2.f)
		{
			if((p1.s.f)<(p2.s.f))
			return true;
		}
		return false;
	}
};
int main(void)
{
	IOS
	ll n;
	cin>>n;
	string str;
	cin>>str;
	vector<ll> marking(n);
	vector<bool> ans(n);
	stack<pair<char,ll>> stk;
	for(ll i=0;i<str.size();i++)
	{
		if(str[i]=='(')
			stk.push({'(',i});
		else
		{
			marking[stk.top().s]=i;
			stk.pop();
		}
	}
	for(ll i=0;i<str.size();)
	{
		ll cnt=0;
		while(i<str.size()&&str[i]=='(')
		{
			if(cnt%2==0)
			{
				ans[i]=1;
				ans[marking[i]]=1;
			}
			else
			{
				ans[i]=0;
				ans[marking[i]]=0;
			}
			cnt++;i++;
		}
		i++;
	}
	for(ll i=0;i<n;i++)
		cout<<ans[i]<<" ";
	cout<<endl;
	return 0;
}


/*** 	short int -> 2 bytes
	for scanning short int use %hd format specifier
	for printing short int use %i or %d format specifier
	The diagonals of parallelogram intersect each other in the middle.
***/
/***
	for taking input from file use ./a.out < input.txt
	for printing output to file use ./a.out > output.txt
***/
/***
	Always use printf/scanf for I/O
***/
/***
	Think twice code once..
	check the result by developing test cases on your own before submitting the code.
***/
#include<bits/stdc++.h>
using namespace std;
#define all(v) v.begin(),v.end()
#define S(v) sort(v.begin(),v.end())
#define pb push_back
#define ppb pop_back
#define MOD (ll)(1e9+7)
#define f first
#define s second
#define max3(a,b,c) max(max(a,b),c)
#define min3(a,b,c) min(min(a,b),c)
#define INF LLONG_MAX
#define NINF LLONG_MIN
#define sc(n) scanf("%lld",&n)
#define pr(n) printf("%lld ",n)
#define endl '\n'
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
typedef long long int ll;
typedef long long unsigned llu;
typedef long double ld;
class Compare
{
	public:
	bool operator() (const pair<ll,pair<ll,ll>> &p1,const pair<ll,pair<ll,ll>> &p2) const
	{
		if(p1.f>p2.f)
			return true;
		else if(p1.f==p2.f)
		{
			if((p1.s.f)<(p2.s.f))
			return true;
		}
		return false;
	}
};
int main(void)
{
	IOS
	ll n;
	cin>>n;
	string str;
	cin>>str;
	vector<ll> marking(n);
	vector<bool> ans(n);
	stack<pair<char,ll>> stk;
	for(ll i=0;i<str.size();i++)
	{
		if(str[i]=='(')
			stk.push({'(',i});
		else
		{
			marking[stk.top().s]=i;
			stk.pop();
		}
	}
	for(ll i=0;i<str.size();)
	{
		ll cnt=0;
		while(i<str.size()&&str[i]=='(')
		{
			if(cnt%2==0)
			{
				ans[i]=1;
				ans[marking[i]]=1;
			}
			else
			{
				ans[i]=0;
				ans[marking[i]]=0;
			}
			cnt++;i++;
		}
		i++;
	}
	for(ll i=0;i<n;i++)
		cout<<ans[i];
	cout<<endl;
	return 0;
}


/*** 	short int -> 2 bytes
	for scanning short int use %hd format specifier
	for printing short int use %i or %d format specifier
	The diagonals of parallelogram intersect each other in the middle.
***/
/***
	for taking input from file use ./a.out < input.txt
	for printing output to file use ./a.out > output.txt
***/
/***
	Always use printf/scanf for I/O
***/
/***
	Think twice code once..
	check the result by developing test cases on your own before submitting the code.
***/
#include<bits/stdc++.h>
using namespace std;
#define all(v) v.begin(),v.end()
#define S(v) sort(v.begin(),v.end())
#define pb push_back
#define ppb pop_back
#define MOD (ll)(1e9+7)
#define f first
#define s second
#define max3(a,b,c) max(max(a,b),c)
#define min3(a,b,c) min(min(a,b),c)
#define INF LLONG_MAX
#define NINF LLONG_MIN
#define sc(n) scanf("%lld",&n)
#define pr(n) printf("%lld ",n)
#define endl '\n'
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
typedef long long int ll;
typedef long long unsigned llu;
typedef long double ld;
class Compare
{
	public:
	bool operator() (const pair<ll,pair<ll,ll>> &p1,const pair<ll,pair<ll,ll>> &p2) const
	{
		if(p1.f>p2.f)
			return true;
		else if(p1.f==p2.f)
		{
			if((p1.s.f)<(p2.s.f))
			return true;
		}
		return false;
	}
};
int main(void)
{
	IOS
	ll n;
	cin>>n;
	string str;
	cin>>str;
	vector<ll> opening,closing;
	for(ll i=0;i<str.size();i++)
		str[i]=='('?opening.pb(i):closing.pb(i);
	for(ll i=0;i<opening.size();i++)
	{
		str[opening[i]]=char(i%2+48);
		str[closing[i]]=char(i%2+48);
	}
	cout<<str<<endl;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    string s, tem = "";
    cin >> s;
    for (int i = 0; i < n; i++) tem += '1';
    int ma = 0, count = 0;
    char c = '(';
    for (int i = 0; i < n; i++) {
        if (s[i] == '(') count++;
        else {
            ma = max(ma, count);
            count = 0;
        }
    }
    ma = max(ma, count);
    int red = ma / 2, r = 0, rr = 0, bb = 0;
    for (int i = 0; i < n; i++) {
        if (s[i] == '(') {
            if (r < red) tem[i] = '0', r++;
            else bb++;
        }
        else {
            if (bb) bb--;
            else tem[i] = '0', r--;
        }
    }
    cout << tem;
}


#include<bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    string s, tem = "";
    cin >> s;
    for (int i = 0; i < n; i++) tem += '1';
    int ma = 0, count = 0;
    char c = '(';
    for (int i = 0; i < n; i++) {
        if (s[i] == '(') count++;
        else {
            ma = max(ma, count);
            count = 0;
        }
    }
    ma = max(ma, count);
    int red = ma / 2;
    int brr[n] = {0};
    count = 0;
    int ind = 200002;
    for (int i = 0; i < n; i++) {
        if (s[i] == '(') count++, ind = min(ind, i);
        else {
            if (count >= red && count) brr[ind] = count;
            ind =200003;
            count = 0;
        }
    }
    if (count >= red && count) brr[ind] = count;
    int r = 0;
    for (int i = 0; i < n; i++) {
        if (brr[i]) {
            for (int j = i; j < i + red; j++) tem[j] = '0', r++;
            if (red)
            i += red - 1;
        }
        else if (s[i] == ')' && r) r--, tem[i] = '0';
    }
    cout << tem;
}


#include<bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    string s, tem = "";
    cin >> s;
    for (int i = 0; i < n; i++) tem += '1';
    int ma = 0, count = 0;
    char c = '(';
    for (int i = 0; i < n; i++) {
        if (s[i] == '(') count++;
        else {
            ma = max(ma, count);
            count = 0;
        }
    }
    ma = max(ma, count);
    int red = ceil((double)ma / 2), r = 0, rr = 0, bb = 0;
    for (int i = 0; i < n; i++) {
        if (s[i] == '(') {
            if (r < red) tem[i] = '0', r++;
            else bb++;
        }
        else {
            if (bb) bb--;
            else tem[i] = '0', r--;
        }
    }
    cout << tem;
}


#include<bits/stdc++.h>
using namespace std;
string check(string t , string tem, string s) {
    string q = "", w = "";
    for (int i = 0; i < s.size(); i++) {
        if (t[i] == '0') q += s[i];
        else w += s[i];
    }
    int ma1 = 0, ma2 = 0, ma3 = 0, ma4 = 0, count = 0;
    for (int i = 0; i < q.size(); i++) {
        if (q[i] == '(') count++;
        else {
            ma1 = max(ma1, count);
            count = 0;
        }
    }
    ma1 = max(ma1, count);
    count = 0;
    for (int i = 0; i < w.size(); i++) {
        if (w[i] == '(') count++;
        else {
            ma2 = max(ma2, count);
            count = 0;
        }
    }
    ma2 = max(ma2, count);
    q = "", w = "";
    count = 0;
    for (int i = 0; i < s.size(); i++) {
        if (tem[i] == '0') q += s[i];
        else w += s[i];
    }
    for (int i = 0; i < q.size(); i++) {
        if (q[i] == '(') count++;
        else {
            ma3 = max(ma3, count);
            count = 0;
        }
    }
    ma3 = max(ma3, count);
    count = 0;
    for (int i = 0; i < w.size(); i++) {
        if (w[i] == '(') count++;
        else {
            ma4 = max(ma4, count);
            count = 0;
        }
    }
    ma4 = max(ma4, count);
    if (max(ma1, ma2)<  max(ma3, ma4)) return t;
    else return tem;
}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    string s, tem = "", t = "";
    cin >> s;
    for (int i = 0; i < n; i++) tem += '1', t += '1';
    int ma = 0, count = 0;
    char c = '(';
    for (int i = 0; i < n; i++) {
        if (s[i] == '(') count++;
        else {
            ma = max(ma, count);
            count = 0;
        }
    }
    ma = max(ma, count);
    int red = ceil((double)ma / 2), r = 0, rr = 0, bb = 0;
    for (int i = 0; i < n; i++) {
        if (s[i] == '(') {
            if (r < red) tem[i] = '0', r++;
            else bb++;
        }
        else {
            if (bb) bb--;
            else tem[i] = '0', r--;
        }
    }
    red = ceil((double)ma / 2);
    r = 0, bb = 0;
    for (int i = 0; i < n; i++) {
        if (s[i] == '(') {
            if (r < red) t[i] = '0', r++;
            else bb++;
        }
        else {
            if (bb) bb--;
            else t[i] = '0', r--;
        }
    }
    cout << check(t, tem, s);
}


#include<bits/stdc++.h>
using namespace std;
string check(string t , string tem, string s) {
    string q = "", w = "";
    for (int i = 0; i < s.size(); i++) {
        if (t[i] == '0') q += s[i];
        else w += s[i];
    }
    int ma1 = 0, ma2 = 0, ma3 = 0, ma4 = 0, count = 0;
    for (int i = 0; i < q.size(); i++) {
        if (q[i] == '(') count++;
        else {
            ma1 = max(ma1, count);
            count = 0;
        }
    }
    ma1 = max(ma1, count);
    count = 0
    for (int i = 0; i < w.size(); i++) {
        if (w[i] == '(') count++;
        else {
            ma2 = max(ma2, count);
            count = 0;
        }
    }
    ma2 = max(ma2, count);
    q = "", w = "";
    count = 0;
    for (int i = 0; i < s.size(); i++) {
        if (tem[i] == '0') q += s[i];
        else w += s[i];
    }
    for (int i = 0; i < q.size(); i++) {
        if (q[i] == '(') count++;
        else {
            ma3 = max(ma3, count);
            count = 0;
        }
    }
    ma3 = max(ma3, count);
    count = 0;
    for (int i = 0; i < w.size(); i++) {
        if (w[i] == '(') count++;
        else {
            ma4 = max(ma4, count);
            count = 0;
        }
    }
    ma4 = max(ma4, count);
    if (max(ma1, ma2)<  max(ma3, ma4)) return t;
    else return tem;
}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    string s, tem = "", t = "";
    cin >> s;
    for (int i = 0; i < n; i++) tem += '1', t += '1';
    int ma = 0, count = 0;
    char c = '(';
    for (int i = 0; i < n; i++) {
        if (s[i] == '(') count++;
        else {
            ma = max(ma, count);
            count = 0;
        }
    }
    ma = max(ma, count);
    int red = ceil((double)ma / 2), r = 0, rr = 0, bb = 0;
    for (int i = 0; i < n; i++) {
        if (s[i] == '(') {
            if (r < red) tem[i] = '0', r++;
            else bb++;
        }
        else {
            if (bb) bb--;
            else tem[i] = '0', r--;
        }
    }
    red = ma / 2;
    r = 0, bb = 0;
    for (int i = 0; i < n; i++) {
        if (s[i] == '(') {
            if (r < red) t[i] = '0', r++;
            else bb++;
        }
        else {
            if (bb) bb--;
            else t[i] = '0', r--;
        }
    }
    cout << check(t, tem, s);
}


#include<bits/stdc++.h>
using namespace std;
string check(string t , string tem, string s) {
    string q = "", w = "";
    for (int i = 0; i < s.size(); i++) {
        if (t[i] == '0') q += s[i];
        else w += s[i];
    }
    int ma1 = 0, ma2 = 0, ma3 = 0, ma4 = 0, count = 0;
    for (int i = 0; i < q.size(); i++) {
        if (q[i] == '(') count++;
        else {
            ma1 = max(ma1, count);
            count = 0;
        }
    }
    ma1 = max(ma1, count);
    count = 0;
    for (int i = 0; i < w.size(); i++) {
        if (w[i] == '(') count++;
        else {
            ma2 = max(ma2, count);
            count = 0;
        }
    }
    ma2 = max(ma2, count);
    q = "", w = "";
    count = 0;
    for (int i = 0; i < s.size(); i++) {
        if (tem[i] == '0') q += s[i];
        else w += s[i];
    }
    for (int i = 0; i < q.size(); i++) {
        if (q[i] == '(') count++;
        else {
            ma3 = max(ma3, count);
            count = 0;
        }
    }
    ma3 = max(ma3, count);
    count = 0;
    for (int i = 0; i < w.size(); i++) {
        if (w[i] == '(') count++;
        else {
            ma4 = max(ma4, count);
            count = 0;
        }
    }
    ma4 = max(ma4, count);
    if (max(ma1, ma2) <  max(ma3, ma4)) return t;
    else return tem;
}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    string s, tem = "", t = "";
    cin >> s;
    for (int i = 0; i < n; i++) tem += '1', t += '1';
    int ma = 0, count = 0;
    char c = '(';
    for (int i = 0; i < n; i++) {
        if (s[i] == '(') count++;
        else {
            ma = max(ma, count);
            count = 0;
        }
    }
    ma = max(ma, count);
    int red = ceil((double)ma / 2), r = 0, rr = 0, bb = 0;
    for (int i = 0; i < n; i++) {
        if (s[i] == '(') {
            if (r < red) tem[i] = '0', r++;
            else bb++;
        }
        else {
            if (bb) bb--;
            else tem[i] = '0', r--;
        }
    }
    red = ma / 2;
    r = 0, bb = 0;
    for (int i = 0; i < n; i++) {
        if (s[i] == '(') {
            if (r < red) t[i] = '0', r++;
            else bb++;
        }
        else {
            if (bb) bb--;
            else t[i] = '0', r--;
        }
    }
    cout << check(t, tem, s);
}


#include<bits/stdc++.h>
using namespace std;
string check(string t , string tem, string s) {
    string q = "", w = "";
    for (int i = 0; i < s.size(); i++) {
        if (t[i] == '0') q += s[i];
        else w += s[i];
    }
    int ma1 = 0, ma2 = 0, ma3 = 0, ma4 = 0, count = 0;
    for (int i = 0; i < q.size(); i++) {
        if (q[i] == '(') count++;
        else {
            ma1 = max(ma1, count);
            count = 0;
        }
    }
    ma1 = max(ma1, count);
    count = 0;
    for (int i = 0; i < w.size(); i++) {
        if (w[i] == '(') count++;
        else {
            ma2 = max(ma2, count);
            count = 0;
        }
    }
    ma2 = max(ma2, count);
    q = "", w = "";
    count = 0;
    for (int i = 0; i < s.size(); i++) {
        if (tem[i] == '0') q += s[i];
        else w += s[i];
    }
    for (int i = 0; i < q.size(); i++) {
        if (q[i] == '(') count++;
        else {
            ma3 = max(ma3, count);
            count = 0;
        }
    }
    ma3 = max(ma3, count);
    count = 0;
    for (int i = 0; i < w.size(); i++) {
        if (w[i] == '(') count++;
        else {
            ma4 = max(ma4, count);
            count = 0;
        }
    }
    ma4 = max(ma4, count);
    if (max(ma1, ma2) <  max(ma3, ma4)) return t;
    else return tem;
}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    string s, tem = "", t = "";
    cin >> s;
    for (int i = 0; i < n; i++) tem += '1', t += '1';
    int ma = 0, count = 0;
    char c = '(';
    for (int i = 0; i < n; i++) {
        if (s[i] == '(') count++;
        else {
            count--;
        }
        ma = max(ma, count);
    }
    ma = max(ma, count);
    int red = ma / 2, r = 0, rr = 0, bb = 0;
    for (int i = 0; i < n; i++) {
        if (s[i] == '(') {
            if (r < red) tem[i] = '0', r++;
            else bb++;
        }
        else {
            if (bb) bb--;
            else tem[i] = '0', r--;
        }
    }
    cout << tem;
}


//Meri hr baat bs yaad hai tumhari , mera apna koi kissa nhi!!
#include<iostream>
#include<vector>
#define ll long long int
#define boost ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define md 1000000007
#define fat 998244353
double PI=3.1415926535;
const int N =  (int)(1 * 1e6 + 10);
using namespace std;
bool sortbysec(const pair<int,int> &a,const pair<int,int> &b)
{
    return (a.second < b.second);
}

int main()
{
    ll n ;
    cin>>n;
    string s;
    cin>>s;
    char t[n];
    t[0]='0';
    ll cnt = 1;
    for(ll i = 1 ; i < n ; i++)
    {
        while(s[i]!=')' && cnt>0)
        {
            i++;
            cnt++;
        }
        t[i]='0';
        while(s[i]!='(' && i<n)
        {
            i++;
        }
        t[i]='0';
    }
    for(ll i = 0 ; i < n ; i++)
    {
        if(t[i]!='0')t[i]='1';
        cout<<t[i];
    }
    //cout<<t<<endl;
}


//Meri hr baat bs yaad hai tumhari , mera apna koi kissa nhi!!
#include<iostream>
#include<vector>
#define ll long long int
#define boost ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define md 1000000007
#define fat 998244353
double PI=3.1415926535;
const int N =  (int)(1 * 1e6 + 10);
using namespace std;
bool sortbysec(const pair<int,int> &a,const pair<int,int> &b)
{
    return (a.second < b.second);
}

int main()
{
    ll n ;
    cin>>n;
    string s;
    cin>>s;
    char t[n];
    t[0]='0';
    ll cnt = 1;
    for(ll i = 1 ; i < n ; i++)
    {
        while(s[i]!=')' && cnt>0)
        {
            i++;
            cnt++;
        }
        if(i!=n)t[i]='0';
        while(s[i]!='(' && i<n)
        {
            i++;
        }
        if(i!=n)t[i]='0';
    }
    for(ll i = 0 ; i < n ; i++)
    {
        if(t[i]!='0')t[i]='1';
        cout<<t[i];
    }
    //cout<<t<<endl;
}


//Meri hr baat bs yaad hai tumhari , mera apna koi kissa nhi!!
#include<iostream>
#include<vector>
#define ll long long int
#define boost ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define md 1000000007
#define fat 998244353
double PI=3.1415926535;
const int N =  (int)(1 * 1e6 + 10);
using namespace std;
bool sortbysec(const pair<int,int> &a,const pair<int,int> &b)
{
    return (a.second < b.second);
}

int main()
{
    ll n ;
    cin>>n;
    string s;
    cin>>s;
    char t[n];
    t[0]='0';
    ll l = 0;

    for(ll i = 0 ; i < n ; i++)
    {
        if(s[i] == ')')l--;
		t[i] = char('0'+(l%2));
		if(s[i] == '(')l++;
    }
    for(ll i = 0 ; i < n ; i++)
    {
        cout<<t[i];
    }
    //cout<<t<<endl;
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, ans[N], mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	bool p = 1;
	stack<pair<char,int> >st;
	st.push(m_p(x[0],0));

	for (int i = 1; i < n; i++)
	{
		if (st.size() && st.top().f == '(' && x[i] == ')')
		{
			ans[st.top().s] = p;
			st.pop();
			ans[i] = p;
			p ^= 1;
		}
		else
		{
			st.push(m_p(x[i], i));
		}
	}

	for (int i = 0; i < n; i++)
	{
		cout << ans[i];
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	int l = 0, r = 0;
	for (int i = 0; i < n; i++)
	{
		int g = 0;
		int l = i;
		while (i < n && x[i] == '(' && x[i + 1] == ')')
		{
			g++;
			i += 2;
		}

		if (g > mx)
		{
			ansl = l;
			ansr = l + g*2 - 1;
			mx = g;
			//cout << ansl << ' ' << ansr << endl;
		}
	}

	for (int i = 0; i < n; i++)
	{
		if (i >= ansl && i <= ansr)
		{
			cout << '1';
		}
		else cout << '0';
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, mx, ansl = -1, ansr = -1;
string x;
string ans;

int main()
{
	inp();
	cin >> n >> x;
	for (int i = 0; i < n; i++)
	{
		ans += '0';
	}
	int l = 0, r = 0;
	for (int i = 0; i < n; i++)
	{
		int g = 0;
		int l = i;
		if (x[i] == '(' && x[i + 1] == ')')
		{
			ans[i] = ans[i + 1] = '1';
			i++;
		}

		if (ans[i] != '1')ans[i] = '0';
	}

	cout << ans;
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	int l = 0, r = 0;
	for (int i = 0; i < n; i++)
	{
		int g = 0;
		int l = i;
		while (i < n && x[i] == '(' && x[i + 1] == ')')
		{
			g++;
			i += 2;
		}

		if (g > mx)
		{
			ansl = l;
			ansr = l + g*2 - 1;
			mx = g;
			//cout << ansl << ' ' << ansr << endl;
		}
	}

	for (int i = 0; i < n; i++)
	{
		if (i >= ansl && i <= ansr)
		{
			cout << '0';
		}
		else cout << '1';
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, mx, ansl = -1, ansr = -1;
string x;
string ans;

int main()
{
	inp();
	cin >> n >> x;
	for (int i = 0; i < n; i++)
	{
		ans += '0';
	}
	int l = 0, r = 0;
	for (int i = 0; i < n; i++)
	{
		int g = 0;
		int l = i;
		if (x[i] == '(' && x[i + 1] == ')')
		{
			ans[i] = ans[i + 1] = '1';
		}

		if (ans[i] != '1')ans[i] = '0';
	}

	cout << ans;
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, ans[N], mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	bool p = 1;
	stack<pair<char, int> >st;
	st.push(m_p(x[0], 0));
	ans[0] = p;
	p ^= 1;
	for (int i = 1; i < n; i++)
	{
		if (x[i] == '(')
		{
			ans[i] = p;
			p ^= 1;
		}

		if (st.size() && st.top().f == '(' && x[i] == ')')
		{
			ans[i] = !ans[st.top().s];
			st.pop();
		}
		else if(x[i] == '(')
		{
			st.push(m_p(x[i], i));
		}
	}

	for (int i = 0; i < n; i++)
	{
		cout << ans[i];
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, ans[N], mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	bool p = 1;
	stack<pair<char, int> >st;
	st.push(m_p(x[0], 0));
	ans[0] = p;

	for (int i = 1; i < n; i++)
	{
		if (x[i] == '(')
		{

			ans[i] = p;
		}

		if (st.size() && st.top().f == '(' && x[i] == ')')
		{
			ans[i] = ans[st.top().s];
			p ^= 1;
			st.pop();
		}
		else if(x[i] == '(')
		{
			st.push(m_p(x[i], i));
		}
	}

	for (int i = 0; i < n; i++)
	{
		cout << ans[i];
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	int l = 0, r = 0;
	for (int i = 0; i < n; i++)
	{
		l = i;
		while (i < n && x[i] == '(')
		{
			i++;
		}
		r = i;

		if (r - l > mx)
		{
			mx = r - l;
			ansl = l, ansr = r;
		}
	}

	for (int i = 0; i < n; i++)
	{
		if (i >= ansl || i <= ansr)
		{
			cout << '1';
		}
		else cout << '0';
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	int l = 0, r = 0;
	for (int i = 0; i < n; i++)
	{
		int g = 0;
		int l = i;
		while (i < n && x[i] == '(' && x[i + 1] == ')')
		{
			g++;
			i += 2;
		}

		if (g > mx)
		{
			ansl = l;
			ansr = l + g*2 - 1;
			//cout << ansl << ' ' << ansr << endl;
		}
	}

	for (int i = 0; i < n; i++)
	{
		if (i >= ansl && i <= ansr)
		{
			cout << '1';
		}
		else cout << '0';
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	int l = 0, r = 0;
	for (int i = 0; i < n; i++)
	{
		l = i;
		while (i < n && x[i] == '(')
		{
			i++;
		}
		r = i;

		if (r - l > mx)
		{
			mx = r - l;
			ansl = l, ansr = r;
		}
	}

	for (int i = 0; i < n; i++)
	{
		if (i == ansl || i == ansr)
		{
			cout << '0';
		}
		else cout << '1';
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, ans[N], mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	bool p = 1;
	stack<int>st;
	st.push(1);

	for (int i = 0; i < n; i++)
	{
		if (x[i] == '(')
		{
			st.push(!st.top());
			ans[i] = st.top();
		}
		else
		{
			ans[i] = st.top();
			st.pop();
		}
	}

	for (int i = 0; i < n; i++)
	{
		cout << ans[i];
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	int l = 0, r = 0;
	for (int i = 0; i < n; i++)
	{
		l = i;
		while (i < n && x[i] == '(')
		{
			i++;
		}
		r = i;

		if (r - l > mx)
		{
			mx = r - l;
			ansl = l, ansr = r;
		}
	}

	for (int i = 0; i < n; i++)
	{
		if (i == ansl || i == ansr)
		{
			cout << '1';
		}
		else cout << '0';
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, mx, ansl = -1, ansr = -1;
string x;
string ans;

int main()
{
	inp();
	cin >> n >> x;
	for (int i = 0; i < n; i++)
	{
		ans += '0';
	}
	int l = 0, r = 0;
	for (int i = 0; i < n; i++)
	{
		int g = 0;
		int l = i;
		if (x[i] == '(' && x[i + 1] == ')')
		{
			ans[i] = ans[i + 1] = '1';
			i++;
			continue;
		}

		if (ans[i] != '1')ans[i] = '0';
	}

	cout << ans;
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, mx, ansl = -1, ansr = -1;
string x;
string ans;

int main()
{
	inp();
	cin >> n >> x;
	for (int i = 0; i < n; i++)
	{
		ans += '0';
	}
	bool val = 0;
	int l = 0, r = 0;
	for (int i = 0; i < n; i++)
	{
		int g = 0;
		int l = i;
		if (x[i] == '(' && x[i + 1] == ')' && val)
		{
			ans[i] = ans[i + 1] = '1';
			i++;
			continue;
		}
		if (x[i] == '(') val = 1;
		if (ans[i] != '1')ans[i] = '0';
	}

	cout << ans;
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, ans[N], mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	bool p = 1;
	stack<int>st;
	st.push(1);
	ans[0] = p;

	for (int i = 1; i < n; i++)
	{
		if (x[i] == '(')
		{
			ans[i] = !st.top();
			st.push(!st.top());
		}
		else
		{
			ans[i] = st.top();
			st.pop();
		}
	}

	for (int i = 0; i < n; i++)
	{
		cout << ans[i];
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, ans[N], mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	bool p = 1;
	stack<pair<char, int> >st;
	st.push(m_p(x[0], 0));
	ans[0] = p;
	p ^= 1;
	for (int i = 1; i < n; i++)
	{
		if (x[i] == '(')
		{
			ans[i] = p;
			p ^= 1;
		}

		if (st.size() && st.top().f == '(' && x[i] == ')')
		{
			ans[i] = ans[st.top().s];
			st.pop();
		}
		else
		{
			st.push(m_p(x[i], i));
		}
	}

	for (int i = 0; i < n; i++)
	{
		cout << ans[i];
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, ans[N], mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	bool p = 1;
	stack<pair<char, int> >st;
	st.push(m_p(x[0], 0));
	ans[0] = p;
	p ^= 1;
	for (int i = 1; i < n; i++)
	{
		if (x[i] == '(')
		{

			ans[i] = p;p ^= 1;
		}

		if (st.size() && st.top().f == '(' && x[i] == ')')
		{
			ans[i] = !ans[st.top().s];
			st.pop();
		}
		else if(x[i] == '(')
		{
			st.push(m_p(x[i], i));
		}
	}

	for (int i = 0; i < n; i++)
	{
		cout << ans[i];
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, ans[N], mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	bool p = 1;
	stack<pair<char, int> >st;
	st.push(m_p(x[0], 0));
	ans[0] = p;
	p ^= 1;
	for (int i = 1; i < n; i++)
	{
		if (x[i] == '(')
		{
			p ^= 1;
			ans[i] = p;
		}

		if (st.size() && st.top().f == '(' && x[i] == ')')
		{
			ans[i] = !ans[st.top().s];
			st.pop();
		}
		else if(x[i] == '(')
		{
			st.push(m_p(x[i], i));
		}
	}

	for (int i = 0; i < n; i++)
	{
		cout << ans[i];
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, ans[N], mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	bool p = 1;
	stack<pair<char, int> >st;
	st.push(m_p(x[0], 0));
	ans[0] = p;
	p ^= 1;
	for (int i = 1; i < n; i++)
	{
		if (x[i] == '(')
		{
			ans[i] = p;
			p ^= 1;
		}

		if (st.size() && st.top().f == '(' && x[i] == ')')
		{
			ans[i] = ans[st.top().s];
			st.pop();
		}
		else if(x[i] == '(')
		{
			st.push(m_p(x[i], i));
		}
	}

	for (int i = 0; i < n; i++)
	{
		cout << !ans[i];
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, ans[N], mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	bool p = 1;
	stack<pair<char,int> >st;
	st.push(m_p(x[0],0));

	for (int i = 1; i < n; i++)
	{
		if (st.size() && st.top().f == '(' && x[i] == ')')
		{
			ans[st.top().s] = p;
			st.pop();
			ans[i] = p;
			p ^= 1;
		}
		else
		{
			st.push(m_p(x[i], i));
		}
	}

	for (int i = 0; i < n; i++)
	{
		cout << !ans[i];
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, ans[N], mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	bool p = 1;
	stack<pair<char, int> >st;
	st.push(m_p(x[0], 0));
	ans[0] = p;
	p ^= 1;
	for (int i = 1; i < n; i++)
	{
		if (x[i] == '(')
		{p ^= 1;
			ans[i] = p;

		}

		if (st.size() && st.top().f == '(' && x[i] == ')')
		{
			ans[i] = ans[st.top().s];
			st.pop();
		}
		else if(x[i] == '(')
		{
			st.push(m_p(x[i], i));
		}
	}

	for (int i = 0; i < n; i++)
	{
		cout << ans[i];
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, ans[N], mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	bool p = 1;
	stack<int>st;
	st.push(1);
	ans[0] = p;

	for (int i = 1; i < n; i++)
	{
		if (x[i] == '(')
		{
			ans[i] = st.top();
			st.push(!st.top());
		}
		else
		{
			ans[i] = st.top();
			st.pop();
		}
	}

	for (int i = 0; i < n; i++)
	{
		cout << ans[i];
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	int l = 0, r = 0;
	for (int i = 0; i < n; i++)
	{
		int g = 0;
		int l = i;
		while (i < n && x[i] == '(' && x[i + 1] == ')')
		{
			g++;
			i += 2;
		}

		if (g > mx)
		{
			ansl = l;
			ansr = l + g*2 - 1;
			//cout << ansl << ' ' << ansr << endl;
		}
	}

	for (int i = 0; i < n; i++)
	{
		if (i >= ansl && i <= ansr)
		{
			cout << '0';
		}
		else cout << '1';
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, ans[N], mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	bool p = 1;
	stack<int>st;
	st.push(1);
	ans[0] = p;

	for (int i = 1; i < n; i++)
	{
		if (x[i] == '(')
		{
			st.push(!st.top());
			ans[i] = st.top();
		}
		else
		{
			ans[i] = st.top();
			st.pop();
		}
	}

	for (int i = 0; i < n; i++)
	{
		cout << ans[i];
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, ans[N], mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	bool p = 1;
	stack<pair<char, int> >st;
	st.push(m_p(x[0], 0));
	ans[0] = p;
	p ^= 1;
	for (int i = 1; i < n; i++)
	{
		if (x[i] == '(')
		{
			ans[i] = p;
			p ^= 1;
		}

		if (st.size() && st.top().f == '(' && x[i] == ')')
		{
			ans[i] = ans[st.top().s];
			st.pop();
		}
		else if(x[i] == '(')
		{
			st.push(m_p(x[i], i));
		}
	}

	for (int i = 0; i < n; i++)
	{
		cout << ans[i];
	}
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <memory.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <queue>
#include <stack>
#include <cstdio>
#include <bitset>

using namespace std;

#define nfs ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f first
#define s second
#define m_p make_pair
#define pb push_back
#define ii pair<int,int>
#define ll long long
#define ld long double
#define ef else if
#define loc(x) (x).begin(),(x).end()
#define locR(x) (x).rbegin(),(x).rend()
#define no puts("NO")
#define yes puts("YES")
#define ex puts("-1")
#define en puts("")
#define _ cout
#define __ <<
#define outV(v) for(int i = 0 ; i < v.size() ; i++)cout << v[i] << ' ';
#define outA(x,l,r) for(int i = l ; i < r ; i++)cout << x[i] << ' ';

#ifndef ONLINE_JUDGE
#define scanf scanf_s
#endif

const ld EPS = 1e-18;
const double DEPS = 1e-9;
const ld PI = 3.141592653589793238;
const ll MOD = 998244353;
const int N = int(5e5) + 10;

void inp()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "inp.txt", "r", stdin);
#endif
}
void out()
{
#ifndef ONLINE_JUDGE
	FILE* stream;
	freopen_s(&stream, "out.txt", "w", stdout);
#endif
}

int n, ans[N], mx, ansl = -1, ansr = -1;
string x;

int main()
{
	inp();
	cin >> n >> x;
	bool p = 0;
	stack<pair<char,int> >st;
	st.push(m_p(x[0],0));

	for (int i = 1; i < n; i++)
	{
		if (st.size() && st.top().f == '(' && x[i] == ')')
		{
			ans[st.top().s] = p;
			ans[i] = p;
			p ^= 1;
		}
		else
		{
			st.push(m_p(x[i], i));
		}
	}

	for (int i = 0; i < n; i++)
	{
		cout << ans[i];
	}
}


#include<bits/stdc++.h>
using namespace std;

#define ALL(s) (s).begin(), (s).end()
#define rALL(s) (s).rbegin(), (s).rend()
#define sz(s) (int)(s).size()
#define mkp make_pair
#define pb push_back

#define forn(i,ini,n) for(i=ini; i<n;i++)

typedef vector<int> vint;
typedef vector<long long int> vll;
typedef long long int ll;

int main()
{
    int l;
    string s;
    cin>>l>>s;
    stack<int> st;
    st.push(0);
    cout<<0;
    for(int i=1;i<l;i++)
    {
        if(s[i] == '(')
        {
            int t = st.top()?0:1;
            st.push(t);
            cout<<t;
        }
        else
        {
            int t = st.top();
            st.pop();
            cout<<t;
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define ALL(s) (s).begin(), (s).end()
#define rALL(s) (s).rbegin(), (s).rend()
#define sz(s) (int)(s).size()
#define mkp make_pair
#define pb push_back

#define forn(i,ini,n) for(i=ini; i<n;i++)

typedef vector<int> vint;
typedef vector<long long int> vll;
typedef long long int ll;

int main()
{
    int l;
    string s;
    cin>>l>>s;
    stack<int> st;
    st.push(0);
    cout<<0;
    for(int i=1;i<l;i++)
    {
        if(s[i] == '(')
        {
            int t = st.top()?0:1;
            st.push(t);
            cout<<t;
        }
        else
        {
            int t = st.top();
            st.pop();
            cout<<t;
        }
    }
}


#include<bits/stdc++.h>
using namespace std;

#define ALL(s) (s).begin(), (s).end()
#define rALL(s) (s).rbegin(), (s).rend()
#define sz(s) (int)(s).size()
#define mkp make_pair
#define pb push_back

#define forn(i,ini,n) for(i=ini; i<n;i++)

typedef vector<int> vint;
typedef vector<long long int> vll;
typedef long long int ll;

int main()
{
    int l;
    string s;
    cin>>l>>s;
    stack<int> st;
    st.push(0);
    cout<<0;
    for(int i=1;i<l;i++)
    {
        if(s[i] == '(')
        {
            int t = st.size()?(st.top()?0:1):0;
            st.push(t);
            cout<<t;
        }
        else
        {
            int t = st.top();
            st.pop();
            cout<<t;
        }
    }
    return 0;
}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
#include <cassert>
using namespace std;
using namespace __gnu_pbds;
typedef tree<long long int, null_type, less_equal<long long int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; //less_equal
#define ll long long int
#define ull unsigned long long int
#define INF 1LL << 63
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define xx first
#define yy second
#define zz second.second
#define vi vector<int>
#define vll vector<ll>
#define seta(a,x) memset (a, x, sizeof (a))
#define pp pair<int, int>
#define ppl pair<ll, ll>
#define sz(s) (int)((s).size())
#define all(v) (v).begin(), (v).end()
#define loop(i,s,n) for(int i=s ; i<=n ; i++)
#define loopl(i,s,n) for(ll i=s ; i<n ; i++)
#define loopr(i,e,s) for(ll i=e; i>=s ; i--)
#define speedUp ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)

int main() {
	//ab_gupta
	speedUp;
	int n; cin>>n;
	string s; cin>>s;
	vector<char> ans(n,'0');
	n/=4;
	int oc=0,cc=0;
	loop(i,0,sz(s)){
		if(s[i]=='(') {
			if(oc<n) ans[i]='1',++oc;
		}
		/*else {
			if(oc>cc ) ans[i]='1',++cc;
		}*/
	}oc=0;
	stack<int> st;
	loopr(i,sz(s)-1,0) {
		if(s[i]=='(') st.pop();
		else st.push(i);
		if(sz(st)>=n) break;
	}
	while(!st.empty()) {
		ans[st.top()]='1'; st.pop();
	}
	for(auto i : ans) cout<<i;
	return 0;
}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
#include <cassert>
using namespace std;
using namespace __gnu_pbds;
typedef tree<long long int, null_type, less_equal<long long int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; //less_equal
#define ll long long int
#define ull unsigned long long int
#define INF 1LL << 63
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define xx first
#define yy second
#define zz second.second
#define vi vector<int>
#define vll vector<ll>
#define seta(a,x) memset (a, x, sizeof (a))
#define pp pair<int, int>
#define ppl pair<ll, ll>
#define sz(s) (int)((s).size())
#define all(v) (v).begin(), (v).end()
#define loop(i,s,n) for(int i=s ; i<=n ; i++)
#define loopl(i,s,n) for(ll i=s ; i<n ; i++)
#define loopr(i,e,s) for(ll i=e; i>=s ; i--)
#define speedUp ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)

int main() {
	//ab_gupta
	speedUp;
	int n; cin>>n;
	string s; cin>>s;
	vector<char> ans(n,'0');
	n/=4;
	int oc=0,cc=0;
	loop(i,0,sz(s)){
		if(s[i]=='(') {
			if(oc<n) ans[i]='1',++oc;
		}
		else {
			if(oc>cc ) ans[i]='1',++cc;
		}
	}
	for(auto i : ans) cout<<i;
	return 0;
}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
#include <cassert>
using namespace std;
using namespace __gnu_pbds;
typedef tree<long long int, null_type, less_equal<long long int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; //less_equal
#define ll long long int
#define ull unsigned long long int
#define INF 1LL << 63
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define xx first
#define yy second
#define zz second.second
#define vi vector<int>
#define vll vector<ll>
#define seta(a,x) memset (a, x, sizeof (a))
#define pp pair<int, int>
#define ppl pair<ll, ll>
#define sz(s) (int)((s).size())
#define all(v) (v).begin(), (v).end()
#define loop(i,s,n) for(int i=s ; i<=n ; i++)
#define loopl(i,s,n) for(ll i=s ; i<n ; i++)
#define loopr(i,e,s) for(ll i=e; i>=s ; i--)
#define speedUp ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)

int main() {
	//ab_gupta
	speedUp;
	int n; cin>>n;
	string s; cin>>s;
	vector<char> ans(n,'0');
	n/=4;
	int oc=0,cc=0;
	queue<int> q;
	loopr(i,sz(s)-1,0){
		if(s[i]==')'){
			q.push(i);
		}
		else{
			if(oc<n){
				oc++;
				ans[q.front()]='1';
				ans[i]='1';
				q.pop();
			}
		}
	}
	for(auto i : ans) cout<<i;
	return 0;
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UVAProblems
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            string[] tokens = Console.ReadLine().Split(' ');
            List<int> list = new List<int>();
            list.Add(int.Parse(tokens[0]));
            int ans = 0;
            for (var i = 1; i < n; ++i)
            {
                int x = int.Parse(tokens[i]);
                if (gcd(x, list[list.Count() - 1]) != 1)
                {
                    list.Add(1);
                    ans++;
                }
                list.Add(x);
            }
            Console.WriteLine(ans);
            foreach(int x in list)
            {
                Console.Write(x + " ");
            }
        }

        static int gcd(int x, int y)
        {
            if (y == 0) return x;
            return gcd(y, x % y);
        }
    }
}


using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

namespace CodeForces
{
	public class Program
	{
		public static void Main(string[] args)
		{
			int n = int.Parse(Console.ReadLine());
			int[] arr = Array.ConvertAll(Console.ReadLine().Split(null), int.Parse);
			List<int> l = new List<int>();
			int count = 0;
			for (int i = 0; i < arr.Length-1; i++)
			{
				if(CoPrime(arr[i], arr[i+1]))
				{
					l.Add(arr[i]);
				}
				else
				{
					count++;
					l.Add(arr[i]);
					l.Add(1);
				}
			}
			l.Add(arr.Last());

			Console.WriteLine(count);
			for (int i = 0; i < l.Count; i++)
			{
				Console.Write(l[i]+" ");
			}
		}

		private static bool CoPrime(int a, int b)
		{
			return GCD(a, b) == 1;
		}

		static int GCD(int a, int b)
		{
			return b == 0 ? a : GCD(b, a % b);
		}
	}
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PrimeArray
{
    class Program
    {
        static long gcd(long a,long b)
        {
            while (b>0)
            {
                long r = a % b;
                a = b;
                b = r;
            }
            return a;
        }
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            string[] s = Console.ReadLine().Split();
            List<long> a = new List<long>();

            for (int i = 0; i < n; i++) a.Add(long.Parse(s[i]));

            int count = 0;
            for (int i=1;i<a.Count;i++)
            {
                if (gcd(a[i],a[i-1])!=1)
                {
                    count++;
                    a.Insert(i, 1);
                    i++;
                }
            }
            Console.WriteLine(count);
            foreach (var item in a)
            {
                Console.Write("{0} ", item);
            }

        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PrimeArray
{
    class Program
    {
        static long gcd(long a,long b)
        {
            while (b>0)
            {
                long r = a % b;
                a = b;
                b = r;
            }
            return a;
        }
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            string[] s = Console.ReadLine().Split();
            List<long> a = new List<long>();

            for (int i = 0; i < n; i++) a.Add(long.Parse(s[i]));

            int count = 0;
            for (int i=1;i<n;i++)
            {
                if (gcd(a[i],a[i-1])!=1)
                {
                    count++;
                    a.Insert(i, 1);
                    i++;
                }
            }
            Console.WriteLine(count);
            foreach (var item in a)
            {
                Console.Write("{0} ", item);
            }

        }
    }
}


using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace Co_prime_Array
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static void Main(string[] args)
        {
            int n = Next();

            var nn = new int[n];
            for (int i = 0; i < n; i++)
            {
                nn[i] = Next();
            }

            var list = new List<int> {nn[0]};

            for (int i = 1; i < n; i++)
            {
                if (Gcd(nn[i], nn[i - 1]) != 1)
                {
                    list.Add(1);
                }
                list.Add(nn[i]);
            }

            writer.WriteLine(list.Count-n);
            foreach (int i in list)
            {
                writer.Write(i);
                writer.Write(' ');
            }
            writer.Flush();
        }

        public static long Gcd(long a, long b)
        {
            return b == 0 ? a : Gcd(b, a%b);
        }

        private static int Next()
        {
            int c;
            int res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
    }
}


using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace Co_prime_Array
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static void Main(string[] args)
        {
            int n = Next();

            var nn = new int[n];
            for (int i = 0; i < n; i++)
            {
                nn[i] = Next();
            }

            var list = new List<int> {nn[0]};

            for (int i = 1; i < n; i++)
            {
                if (Gcd(nn[i], nn[i - 1]) != 1)
                {
                    list.Add(1);
                }
                list.Add(nn[i]);
            }

            writer.WriteLine(list.Count);
            foreach (int i in list)
            {
                writer.Write(i);
                writer.Write(' ');
            }
            writer.Flush();
        }

        public static long Gcd(long a, long b)
        {
            return b == 0 ? a : Gcd(b, a%b);
        }

        private static int Next()
        {
            int c;
            int res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
    }
}


using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Numerics;
using System.Text;

namespace Codeforces
{
    class Program : ProgramBase
    {
        private const long commonMod = 1000000007;
        static void Main(string[] args)
        {
            var p = new Program();
            var x = p.Get();
            p.Out(x);
        }
        void Add(List<int> result, int i, int m)
        {
            if (i <= m)
                result.Add(i);
        }
        object Get()
        {
            checked
            {

                var n = ReadInt();
                var a = ReadLongs();
                var inserted = new List<Tuple<int, long>>();
                for (int i = 0; i < n - 1; i++)
                    if (NOD(a[i], a[i + 1]) > 1)
                        inserted.Add(Tuple.Create(i, a[i] * a[i + 1] / NOD(a[i], a[i + 1]) + 1));

                var result = new List<long>() { a[0] };
                int j = 0;
                for (int i = 0; i < n - 1; i++)
                {
                    if (j < inserted.Count && i == inserted[j].Item1)
                    {
                        result.Add(inserted[j].Item2);
                        j++;
                    }
                    result.Add(a[i + 1]);
                }
                return inserted.Count + "\n" + result.Select(x => x.ToString()).JoinStrings(" ");
            }
        }

        public long NOD(long a, long b)
        {
            if (a < b)
                return NOD(b, a);
            if (b == 0)
                return a;
            return NOD(b, a % b);
        }

        public double ProcessPair(long[] a, long[] b, int p)
        {
            return ((double)NumberOfDivs(a, p) * 2000) / Count(a) +
                ((double)NumberOfDivs(b, p) * 2000) / Count(b) -
                ((double)(NumberOfDivs(a, p) * NumberOfDivs(b, p))) * 2000 / (Count(a) * Count(b));
        }

        public long NumberOfDivs(long[] a, int p)
        {
            return a[1] / p - (a[0] - 1) / p;
        }

        public long Count(long[] a)
        {
            return a[1] - a[0] + 1;
        }

        bool DoubleEquals(double a, double b)
        {
            return Math.Abs(a - b) < 0.0000000001;
        }

        bool SameLine(double[] a, double[] b, double[] c)
        {
            var x = a[0];
            var y = a[1];
            var x1 = b[0];
            var y1 = b[1];
            var x2 = c[0];
            var y2 = c[1];
            return DoubleEquals((x - x1) * (y2 - y1), (y - y1) * (x2 - x1));
        }

        object Get7()
        {
            checked
            {
                var m = ReadInt();
                var p = ReadLongs();
                var arr = p.GroupBy(x => x).Select(g => new { g.Key, Count = g.Count() }).ToArray();
                var even = arr.Where(x => (x.Count & 1) == 0).FirstOrDefault();
                if (even != null)
                {
                    var index = Array.IndexOf(arr, even);
                    //arr[index].Count = arr[index].Count / 2;
                }
                long divs = 1;
                long result = 1;
                foreach (var a in arr)
                {
                    var pi = a.Key;
                    var curr = pi;
                    var olddivs = divs;
                    var oldres = result;
                    for (int i = 0; i < a.Count; i++)
                    {
                        result = (result * oldres % commonMod) * FastPow(curr, olddivs, commonMod) % commonMod;
                        curr = curr * pi % commonMod;
                        divs = (divs + olddivs) % (commonMod - 1);
                    }
                }
                return result;
            }
        }

        public long FastPow(long x, BigInteger pow, long mod)
        {
            if (pow == 0)
                return 1;
            if ((pow & 1) == 0)
                return FastPow(x * x % mod, pow / 2, mod);
            return x * FastPow(x, pow - 1, mod) % mod;
        }

        class Cut
        {
            public int a;
            public int b;
            public int line;
        }

        //object Get3()
        //{
        //    FileName = "";
        //    checked
        //    {
        //        var n = ReadInt();
        //        var hor = new List<Cut>();
        //        var ver = new List<Cut>();
        //        for (int i = 0; i < n; i++)
        //        {
        //            var a = ReadInts();
        //            if (a[0] == a[2])
        //                ver.Add(new Cut() { a = Math.Min(a[1], a[3]), b = Math.Max(a[1], a[3]), line = a[0] });
        //            else
        //                hor.Add(new Cut() { a = Math.Min(a[0], a[2]), b = Math.Max(a[0], a[2]), line = a[1] });
        //        }
        //        ver = Merge(ver);
        //        hor = Merge(hor);

        //    }
        //}

        List<Cut> Merge(List<Cut> l)
        {
            var a = l.OrderBy(x => x.line).ThenBy(x => x.a).ToArray();
            Cut previous = null;
            var result = new List<Cut>();
            for (int i = 0; i < a.Length; i++)
                if (previous == null)
                    previous = a[i];
                else
                    if (previous.line == a[i].line && previous.b >= a[i].a)
                        previous.b = Math.Max(previous.b, a[i].b);
                    else
                    {
                        result.Add(previous);
                        previous = a[i];
                    }
            if (previous != null)
                result.Add(previous);
            return result;
        }

    }
    abstract class ProgramBase
    {
        bool? prod = null;
        StreamReader f;
        protected string FileName { private get; set; }

        protected string Read()
        {
            if (string.IsNullOrEmpty(FileName))
                return Console.ReadLine();
            if (f == null)
                f = new StreamReader((GetProd() ? "" : "c:\\dev\\") + FileName + ".in");
            return f.ReadLine();
        }

        protected int ReadInt()
        {
            return Convert.ToInt32(Read());
        }
        protected int[] ReadInts()
        {
            return Read().Split(' ').Select(x => Convert.ToInt32(x)).ToArray();
        }

        protected long ReadLong()
        {
            return Convert.ToInt64(Read());
        }

        protected long[] ReadLongs()
        {
            return Read().Split(' ').Select(x => Convert.ToInt64(x)).ToArray();
        }

        public void Out(object r)
        {
            if (string.IsNullOrEmpty(FileName))
                Console.WriteLine(r);
            else if (GetProd())
                File.WriteAllText(FileName + ".out", r.ToString());
            else
                Console.WriteLine(r);
        }

        private bool GetProd()
        {
            if (!prod.HasValue)
                try
                {
                    prod = Environment.MachineName != "RENADEEN-NB-W7";
                }
                catch (Exception)
                {
                    prod = true;
                }
            return prod.Value;
        }
    }

    public static class Huj
    {
        public static T MinBy<T>(this IEnumerable<T> source, Func<T, double> func) where T : class
        {
            T result = null;
            var min = double.MaxValue;
            foreach (var item in source)
            {
                var current = func(item);
                if (min > current)
                {
                    min = current;
                    result = item;
                }
            }
            return result;
        }

        public static T MaxBy<T>(this IEnumerable<T> source, Func<T, double> func)
        {
            T result = default(T);
            var max = double.MinValue;
            foreach (var item in source)
            {
                var current = func(item);
                if (max < current)
                {
                    max = current;
                    result = item;
                }
            }
            return result;
        }

        public static string JoinStrings(this IEnumerable<string> source, string delimeter)
        {
            return string.Join(delimeter, source.ToArray());
        }
    }
}