#include <bits/stdc++.h>
using namespace std;
double tick() {
  static clock_t oldt, newt = clock();
  double diff = 1.0 * (newt - oldt) / CLOCKS_PER_SEC;
  oldt = newt;
  return diff;
}
char rbs[200005];
vector<int> codes(200005, 0);
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  scanf("%d", &n);
  scanf("%s", rbs);
  int i = 0, j = 0, c = 0;
  vector<int> v;
  while (i < n) {
    if (rbs[i] == '(') v.push_back(c), codes[i] = c, c = 1 - c;
    if (rbs[i] == ')') codes[i] = v[j], j++;
    i++;
  }
  for (int i = 0; i < n; i++) cout << codes[i];
  cout << endl;
}
