#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  vector<int> stk;
  vector<int> ans;
  for (auto i : s) {
    if (stk.empty()) {
      stk.push_back(0);
      ans.push_back(0);
      continue;
    }
    if (i == '(') {
      stk.push_back(!stk.back());
      ans.push_back(stk.back());
      continue;
    }
    ans.push_back(stk.back());
    stk.pop_back();
  }
  for (auto &i : ans) cout << i;
  cout << "\n";
  return 0;
}
