#include <bits/stdc++.h>
using namespace std;
void solve();
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int t = 1;
  for (int i = 1; i <= t; ++i) solve();
  cerr << "Time taken: " << ((clock() * 1000) / CLOCKS_PER_SEC) << "ms\n";
}
void solve() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  stack<char> st;
  int dpth = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '(') {
      st.push(s[i]);
      dpth = max(dpth, (int)st.size());
    } else if (s[i] == ')') {
      st.pop();
    }
  }
  std::vector<int> v(n, 0);
  for (int i = 0; i < n; ++i) {
    if (s[i] == '(') {
      st.push(s[i]);
      if ((int)st.size() > dpth / 2) {
        v[i] = 1;
      }
    } else if (s[i] == ')') {
      if ((int)st.size() > dpth / 2) v[i] = 1;
      st.pop();
    }
  }
  for (int i = 0; i < n; ++i) cout << v[i];
  cout << '\n';
}
