#include <bits/stdc++.h>
using namespace std;
struct debugger {
  static void call(string::iterator it, string::iterator ed) {}
  template <typename T, typename... aT>
  static void call(string::iterator it, string::iterator ed, T a, aT... rest) {
    string b;
    for (; *it != ','; ++it)
      if (*it != ' ') b += *it;
    cerr << b << " = " << a << " ";
    call(++it, ed, rest...);
  }
};
string bs;
int dc[300010];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n;
  cin >> n;
  cin >> bs;
  int k = 0;
  int a = 0;
  for (int i = 0; i < n; i++) {
    if (bs[i] == '(') {
      ++k;
      dc[i] = k;
    } else {
      dc[i] = k;
      --k;
    }
    a = max(a, k);
  }
  a /= 2;
  for (int i = 0; i < n; i++) {
    if (dc[i] <= a) {
      cout << "1";
    } else {
      cout << "0";
    }
  }
  cout << endl;
}
