#include <bits/stdc++.h>
using namespace std;
long long int powr(long long a, long long b) {
  if (b == 0) {
    return 1;
  }
  if (b % 2 == 0) {
    return powr(((a % 1000000007) * (a % 1000000007)) % 1000000007, b / 2);
  } else {
    if (b == 1) {
      return a;
    } else {
      return (a * powr(((a % 1000000007) * (a % 1000000007) % 1000000007),
                       (b - 1) / 2)) %
             1000000007;
    }
  }
}
long long gcd1(long long a, long long b) {
  if (a == 0)
    return b;
  else {
    return gcd1(b % a, a);
  }
}
long long lcm(long long a, long long b) { return (a * b) / gcd1(a, b); }
int mod1(int a) {
  if (a < 0)
    return -1 * a;
  else {
    return a;
  }
}
bool isPrime(int num) {
  bool flag = true;
  for (int i = 2; i <= sqrt(num); i++) {
    if (num % i == 0) {
      flag = false;
      break;
    }
  }
  return flag;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int first;
  first = 1;
  for (int k1 = 0; k1 < first; k1++) {
    int n, flag = 1, a[1000000];
    stack<int> second;
    cin >> n;
    string str;
    cin >> str;
    for (int i = 0; i < n; i++) {
      if (str[i] == '(') {
        second.push(flag);
        a[i] = flag;
        if (flag)
          flag = 0;
        else {
          flag = 1;
        }
      } else {
        a[i] = (second.top());
        flag = !flag;
        second.pop();
      }
    }
    for (long long i = 0; i < n; i++) cout << a[i];
  }
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
}
