#include <bits/stdc++.h>
using namespace std;
pair<long long int, long long int> p[300001];
int main() {
  long long int n;
  cin >> n;
  string s;
  cin >> s;
  long long int open = 0;
  long long int depth = 0;
  for (long long int i = 0; i < n; i++) {
    if (s[i] == '(')
      open++;
    else {
      open--;
    }
    depth = max(depth, open);
  }
  depth = ceil(((double)depth) / 2.0);
  stack<pair<long long int, char> > st;
  open = 0;
  string str = s;
  for (long long int i = 0; i < n; i++) {
    if (s[i] == '(') {
      open++;
      if (open <= depth) {
        st.push({i, '0'});
        str[i] = '0';
      } else {
        st.push({i, '1'});
        str[i] = '1';
      }
    } else {
      open--;
      str[i] = st.top().second;
      st.pop();
    }
  }
  cout << str;
  return 0;
}
