#include <bits/stdc++.h>
int main() {
  int n, temp = 0;
  std::string s;
  std::cin >> n;
  std::cin >> s;
  int a[n];
  int max = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '(') ++temp;
    a[i] = temp;
    if (temp > max) max = temp;
    if (s[i] == ')') --temp;
  }
  max = max / 2;
  temp = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '(') ++temp;
    if (temp > max)
      std::cout << 1;
    else
      std::cout << 0;
    if (s[i] == ')') --temp;
  }
  return 0;
}
