#include <bits/stdc++.h>
using namespace std;
int n;
char s[500005];
int t[500005], stk[500005], tp;
int b[500005];
void S(int l, int r, int k) {
  for (int i = l; i <= r; ++i) {
    b[i] = b[t[i]] = k;
    S(i + 1, t[i] - 1, k ^ 1);
    i = t[i];
  }
}
int main() {
  scanf("%d%s", &n, s + 1);
  for (int i = 1; i <= n; ++i) {
    if (s[i] == '(')
      stk[++tp] = i;
    else
      t[stk[tp]] = i, t[i] = stk[tp], --tp;
  }
  S(1, n, 0);
  for (int i = 1; i <= (n); ++i) printf("%d", b[i]);
  return 0;
}
