#include <bits/stdc++.h>
using namespace std;
long long n;
string s;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> s;
  vector<long long> pos1, pos2;
  long long bal1 = 0, bal2 = 0;
  for (long long i = 0; i < n; ++i) {
    if (s[i] == '(') {
      if (bal1 > bal2) {
        ++bal2;
        pos2.push_back(i);
      } else {
        ++bal1;
        pos1.push_back(i);
      }
    } else {
      if (bal1 > bal2) {
        --bal1;
        pos1.push_back(i);
      } else {
        --bal2;
        pos2.push_back(i);
      }
    }
  }
  assert(bal1 == 0 && bal2 == 0);
  string ans(n, '?');
  for (auto u : pos1) ans[u] = '1';
  for (auto u : pos2) ans[u] = '0';
  for (long long i = 0; i < n; ++i) {
    assert(ans[i] != '?');
    cout << ans[i];
  }
}
