#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unrolled-loops")
using namespace std;
const int mod = 1e9 + 7;
int test = 1;
int n;
string s;
int a[200200];
int cnt1 = 0, cnt2 = 0, cnt3 = 0, cnt4 = 0;
int maxDepth = 0;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  cin >> s;
  s = '0' + s;
  int l = n - 1;
  for (int i = 1; i <= n; i++) {
    if (s[i] == '(')
      cnt1++;
    else
      cnt2++;
    maxDepth = max(maxDepth, cnt1 - cnt2);
  }
  cnt1 = 0;
  cnt2 = 0;
  for (int i = 1; i <= n; i++) {
    if (cnt1 - cnt2 < maxDepth / 2 + (maxDepth % 2)) {
      cout << 1;
      if (s[i] == '(')
        cnt1++;
      else
        cnt2++;
    } else {
      if (s[i] == ')') {
        if (cnt3 > cnt4) {
          cout << 0;
          cnt4++;
        } else {
          cnt2++;
          cout << 1;
        }
      } else {
        cout << 0;
        cnt3++;
      }
    }
  }
}
