#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, m, i, j;
  string str;
  cin >> n;
  cin >> str;
  stack<int> s;
  int arr[n];
  j = 0;
  for (i = 0; i < n; i++) {
    if (str[i] == '(') {
      if (s.empty()) {
        s.push(i);
        arr[i] = 0;
      } else {
        arr[i] = (arr[s.top()] + 1) % 2;
        s.push(i);
      }
    } else {
      arr[i] = arr[s.top()];
      s.pop();
    }
  }
  for (i = 0; i < n; i++) cout << arr[i];
}
