#include <bits/stdc++.h>
const int Z = (int)5e5 + 123;
const int inf = (int)2e9 + 123;
const long long llinf = (long long)2e18 + 123;
const double PI = acos(-1.0);
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  ;
  int n;
  cin >> n;
  string s;
  cin >> s;
  int cnt1 = 0, cnt2 = 0;
  string fin;
  int ans, now1 = 0, now2 = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '(') {
      if (cnt1 < cnt2) {
        cnt1++;
        now1++;
        ans = max(now1, ans);
        fin += '0';
      } else {
        cnt2++;
        now2++;
        ans = max(now2, ans);
        fin += '1';
      }
    } else {
      if (cnt1 < cnt2) {
        cnt2--;
        now2--;
        fin += '1';
      } else {
        cnt1--;
        now1--;
        fin += '0';
      }
    }
  }
  cout << fin;
  return 0;
}
