#include <bits/stdc++.h>
using namespace std;
int n;
char s[200005];
vector<int> v[200005];
int f[200005];
int d[200005];
int t;
void dfs(int now) {
  for (int i = 0; i < v[now].size(); i++) {
    if (d[now] < t) {
      printf("0");
      dfs(v[now][i]);
      printf("0");
    } else {
      printf("1");
      dfs(v[now][i]);
      printf("1");
    }
  }
}
int main() {
  cin >> n;
  scanf("%s", s + 1);
  int now = 0;
  int top = 0;
  int depth = 0;
  int _max = 0;
  for (int i = 1; i <= n; i++) {
    if (s[i] == '(') {
      top++;
      v[now].push_back(top);
      f[top] = now;
      now = top;
      depth++;
      d[top] = depth;
    } else {
      now = f[now];
      depth--;
    }
    _max = max(_max, depth);
  }
  t = _max / 2;
  dfs(0);
  return 0;
}
