#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  string s;
  cin >> n >> s;
  long long arr[200000] = {};
  stack<char> a, b;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '(')
      if (a.size() <= b.size())
        a.push('('), arr[i] = 0;
      else
        b.push('('), arr[i] = 1;
    else if (a.size() >= b.size())
      a.pop(), arr[i] = 0;
    else
      b.pop(), arr[i] = 1;
  }
  for (long long i = 0; i < n; i++) cout << arr[i];
  cout << '\n';
  return 0;
}
