#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, i, c = 0;
  cin >> n;
  string s = "";
  cin >> s;
  int max1 = INT_MIN;
  for (i = 0; i < n; i++) {
    if (s[i] == '(')
      c++;
    else
      c--;
    if (c > max1) max1 = c;
  }
  string c1 = "";
  int d = 0;
  for (i = 0; i < n; i++) {
    if ((s[i] == '(') && (d == (int)((max1 + 1) / 2))) {
      int e = 0;
      while ((s[i] != ')') || (e != 1)) {
        if (s[i] == '(')
          e++;
        else
          e--;
        c1 += "0";
        i++;
      }
      c1 += "0";
    } else {
      if (s[i] == '(')
        d++;
      else
        d--;
      c1 += "1";
    }
  }
  cout << c1 << endl;
  return 0;
}
