#include <bits/stdc++.h>
using namespace std;
int maxN(int n, int x) {
  int s = 0, mx = 0;
  for (int j = 0; j < n; j++) {
    if (x & (1 << j))
      s++;
    else
      s--;
    mx = max(mx, s);
    if (s < 0) break;
  }
  return s < 0 ? -1 : mx;
}
int main() {
  int n;
  string s;
  cin >> n >> s;
  int c = 0;
  vector<int> cp(n), l;
  set<int> o;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      l.push_back(i), o.insert(i);
    else {
      c--, cp[l.back()] = i;
      l.pop_back();
    }
  }
  string ans(n, '0');
  int x = 0;
  while (!o.empty()) {
    auto it = begin(o);
    while (it != end(o)) {
      int p = *it;
      o.erase(it);
      ans[p] = x + '0';
      ans[cp[p]] = x + '0';
      it = o.upper_bound(cp[p]);
    }
    x ^= 1;
  }
  cout << ans << endl;
}
