#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int ans[n + 1];
  int r = 0, b = 0, nesting = 0;
  int color = 1;
  char x;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(') {
      nesting++;
      color = (color + 1) % 2;
      ans[i] = color;
    } else {
      if (nesting) {
        ans[i] = color;
        color = (color + 1) % 2;
        nesting--;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i];
  }
}
