#include <bits/stdc++.h>
const int maxn = 200050;
using namespace std;
char str[maxn];
int ans[maxn];
int st[maxn];
int main() {
  int n;
  scanf("%d", &n);
  scanf("%s", str + 1);
  int tail = 1;
  for (int i = 1; i <= n; i++) {
    if (str[i] == '(') {
      ans[i] = !st[tail - 1];
      st[tail++] = ans[i];
    } else {
      ans[i] = st[tail - 1];
      tail--;
    }
  }
  for (int i = 1; i <= n; i++) printf("%d", ans[i]);
  return 0;
}
