#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    string s, ans = "";
    cin >> s;
    stack<char> val;
    for (int i = 0; i < n; ++i) {
      if (s[i] == '(') {
        if (val.empty()) {
          val.push('0');
          ans += '0';
          continue;
        }
        char foo = val.top();
        if (foo == '1') {
          val.push('0');
          ans += '0';
        } else {
          val.push('1');
          ans += '1';
        }
      } else {
        char foo = val.top();
        if (foo == '1')
          ans += '1';
        else
          ans += '0';
        val.pop();
      }
    }
    cout << ans << '\n';
  }
  return 0;
}
