#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
const double esp = 1e-12;
const int inf = 0x3f3f3f3f;
int flag[200005];
int ff[200005];
int main() {
  int n;
  cin >> n;
  string str;
  cin >> str;
  int sum = 0, Max = 0;
  for (int i = 0; i < str.size(); i++) {
    if (str[i] == '(')
      sum++;
    else
      sum--;
    ff[i] = sum;
    Max = max(sum, Max);
  }
  Max /= 2;
  stack<int> a;
  for (int i = 0; i < str.size(); i++) {
    if (str[i] == '(') {
      a.push(str[i]);
      if (a.size() <= Max) flag[i] = 1;
    } else {
      a.pop();
      if (a.size() < Max) flag[i] = 1;
    }
  }
  for (int i = 0; i < str.size(); i++) {
    cout << flag[i];
  }
  return 0;
}
