#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200100;
int CNT;
map<pair<int, int>, int> tko;
int n, R[MAXN];
char s[MAXN];
stack<int> st;
int mogu[MAXN], dep[MAXN];
int maks, boja[MAXN];
void calc(int l, int r, int d) {
  tko[make_pair(l, r)] = ++CNT;
  maks = max(maks, d);
  dep[tko[make_pair(l, r)]] = d;
  for (int i = (l); i < int(r + 1); i++) {
    if (s[i] == '(') {
      calc(i + 1, R[i] - 1, d + 1);
      i = R[i];
    }
  }
}
void rek(int l, int r) {
  int cvor = tko[make_pair(l, r)];
  if (dep[cvor] == maks) mogu[cvor] = 1;
  for (int i = (l); i < int(r + 1); i++) {
    if (s[i] == '(') {
      rek(i + 1, R[i] - 1);
      mogu[cvor] |= mogu[tko[make_pair(i + 1, R[i] - 1)]];
      i = R[i];
    }
  }
  if (dep[cvor] >= maks / 2 && mogu[cvor]) {
    if (dep[cvor] == maks)
      boja[l - 1] = 1;
    else
      boja[l] = 1;
  }
}
int main() {
  scanf("%d %s", &n, s);
  for (int i = (0); i < int(n); i++) {
    if (s[i] == '(')
      st.push(i);
    else {
      R[st.top()] = i;
      st.pop();
    }
  }
  int tmp = 0;
  for (int i = (0); i < int(n); i++) {
    if (s[i] == '(')
      tmp++;
    else
      tmp--;
    maks = max(maks, tmp);
  }
  tmp = 0;
  for (int i = (0); i < int(n); i++) {
    if (s[i] == '(')
      tmp++;
    else
      tmp--;
    if (tmp <= maks / 2 && s[i] == '(') boja[i] = boja[R[i]] = 1;
  }
  for (int i = (0); i < int(n); i++) printf("%d", boja[i]);
  puts("");
  return 0;
}
