#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
template <class T, class U>
istream &operator>>(istream &in, pair<T, U> &p) {
  in >> p.first >> p.second;
  return in;
}
template <class T, class U>
ostream &operator<<(ostream &out, const pair<T, U> &p) {
  out << p.first << ' ' << p.second;
  return out;
}
template <class T>
istream &operator>>(istream &in, vector<T> &v) {
  for (auto &i : v) {
    in >> i;
  }
  return in;
}
template <class T>
ostream &operator<<(ostream &out, const vector<T> &v) {
  for (auto &i : v) {
    out << i << ' ';
  }
  return out;
}
inline void io(int x = 15) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  srand(time(0));
  cout << fixed << setprecision(x);
}
bool prime_test(long long n) {
  for (long long i = 2; i * i <= n; ++i)
    if ((n >= 0 && n < 2) || n % i == 0) return false;
  return true;
}
void prime_nums(int n, vector<char> &prime) {
  prime[0] = prime[1] = false;
  for (long long i = 2; i * i <= n; ++i) {
    if (prime[i]) {
      for (int j = i * i; j <= n; j += i) {
        prime[j] = false;
      }
    }
  }
}
long long bin_pow(long long a, long long b, long long m = 0) {
  if (m == 0)
    return b == 0 ? 1 : (b % 2 ? bin_pow(a, b - 1) * a : bin_pow(a * a, b / 2));
  if (b == 0) return 1;
  long long temp = bin_pow(a, b / 2, m);
  if (b % 2 == 0)
    return (temp * temp) % m;
  else
    return (a * temp * temp) % m;
}
int main() {
  io();
  int n;
  cin >> n;
  stack<int> s;
  int last_shit = 1;
  for (int i = 0; i < n; ++i) {
    char x;
    cin >> x;
    if (x == '(') {
      last_shit = 1 - last_shit;
      cout << last_shit;
      s.push(last_shit);
    } else {
      cout << last_shit;
      s.pop();
      if (!s.empty()) last_shit = s.top();
    }
  }
  return 0;
}
