#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
T div_floor(T a, T b) {
  if (b < 0) a *= -1, b *= -1;
  return a >= 0 ? a / b : (a + 1) / b - 1;
}
template <class T>
T div_ceil(T a, T b) {
  if (b < 0) a *= -1, b *= -1;
  return a > 0 ? (a - 1) / b + 1 : a / b;
}
constexpr long long mod = 1000000007;
constexpr long long INF = mod * mod;
constexpr int MAX = 500010;
int main() {
  int n;
  string s;
  cin >> n >> s;
  int dep = 0, ans[n];
  stack<int> st;
  for (int((i)) = (int)(0); ((i)) < (int)((n)); ++((i))) {
    if (s[i] == '(') {
      ++dep;
      st.push(i);
    } else {
      --dep;
      ans[i] = ans[st.top()] = dep % 2;
      st.pop();
    }
  }
  for (int((i)) = (int)(0); ((i)) < (int)((n)); ++((i))) printf("%d", ans[i]);
  printf("\n");
}
