#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const double EPS = 1e-8;
const double PI = 2 * acos(0);
const int MAXN = 1e6 + 6;
int n;
string s, r;
bool input() {
  cin >> n >> s;
  r = s;
  return !cin.fail();
}
void process() {
  int maxlevel = 0;
  int mo = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '(')
      mo++;
    else
      mo--;
    if (mo > maxlevel) maxlevel = mo;
  }
  mo = 0;
  maxlevel = (maxlevel / 2);
  for (int i = 0; i < n; ++i) {
    if (s[i] == '(') mo++;
    if (mo <= maxlevel)
      r[i] = '0';
    else
      r[i] = '1';
    if (s[i] == ')') mo--;
  }
  cout << r << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  while (input()) {
    process();
  }
  return 0;
}
