#include <bits/stdc++.h>
using namespace std;
char s[333000];
int mark[333000];
int main() {
  int n;
  scanf("%d", &n);
  scanf("%s", s);
  int r = 0, b = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(') {
      if (r < b) {
        r++;
        mark[i] = 1;
      } else {
        b++;
        mark[i] = 2;
      }
    } else {
      if (r < b) {
        b--;
        mark[i] = 2;
      } else {
        r--;
        mark[i] = 1;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (mark[i] == 1)
      printf("0");
    else if (mark[i] == 2)
      printf("1");
    else
      printf("2");
  }
  return 0;
}
