#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char str[300000];
  scanf("%s", str);
  string str1 = "";
  stack<char> p1, p2;
  for (int i = 0; i < n; i++) {
    if (str[i] == '(')
      if (p1.size() < p2.size()) {
        p1.push('(');
        str1 += "1";
      } else {
        p2.push('(');
        str1 += "0";
      }
    else {
      if (p1.size() < p2.size()) {
        p2.pop();
        str1 += "0";
      } else {
        p1.pop();
        str1 += "1";
      }
    }
  }
  cout << str1 << endl;
  return 0;
}
