#include <bits/stdc++.h>
using namespace std;
bool isprime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6) {
    if (n % i == 0 || n % (i + 2) == 0) return false;
  }
  return true;
}
bool sec(const pair<long long, long long> &a,
         const pair<long long, long long> &b) {
  return a.second > b.second;
}
long long po(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
vector<vector<long long> > v(500001);
bool vis[500001];
vector<long long> co;
void dfs(long long second) {
  vis[second] = true;
  co.push_back(second);
  for (long long i = 0; i < v[second].size(); ++i) {
    if (vis[v[second][i]] == false) dfs(v[second][i]);
  }
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  srand(time(NULL));
  long long n;
  cin >> n;
  long long an[n], i;
  stack<pair<char, long long> > t;
  string second;
  cin >> second;
  for (i = 0; i < n; i++) {
    if (t.size() == 0) {
      t.push(make_pair(second[i], i));
      an[i] = 0;
    } else {
      if (t.top().first == '(' && second[i] == ')') {
        an[i] = an[t.top().second];
        t.pop();
      } else {
        an[i] = !an[t.top().second];
        t.push(make_pair(second[i], i));
      }
    }
  }
  for (i = 0; i < n; i++) cout << an[i];
}
