#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string b;
  cin >> b;
  int num = 0;
  int max0 = 0;
  for (int i = 0; i < n; i++) {
    if (b[i] == '(')
      num++;
    else {
      num--;
    }
    max0 = max(max0, num);
  }
  num = max0 / 2;
  int num0 = 0;
  for (int i = 0; i < n; i++) {
    if (b[i] == '(') {
      if (num0 < num) {
        cout << 0;
        num0++;
      } else {
        int num1 = 0;
        for (; i < n; i++) {
          if (b[i] == '(')
            num1++;
          else {
            num1--;
          }
          cout << 1;
          if (num1 <= 0) break;
        }
      }
    } else {
      cout << 0;
      num0--;
    }
  }
  return 0;
}
