#include <bits/stdc++.h>
using namespace std;
int main() {
  stack<char> red, blue;
  long long int length, i;
  cin >> length;
  string bracket;
  cin >> bracket;
  for (i = 0; i < bracket.length(); i++) {
    if (bracket[i] == '(' && red.empty()) {
      red.push(bracket[i]);
      cout << 0;
    } else if (bracket[i] == ')' && !red.empty()) {
      red.pop();
      cout << 0;
    } else if (bracket[i] == '(' && blue.empty()) {
      blue.push(bracket[i]);
      cout << 1;
    } else if (bracket[i] == '(' && red.size() <= blue.size()) {
      red.push(bracket[i]);
      cout << 0;
    } else if (bracket[i] == '(' && red.size() > blue.size()) {
      blue.push(bracket[i]);
      cout << 1;
    } else {
      blue.pop();
      cout << 1;
    }
  }
}
