//prewritten code: https://github.com/antma/algo
import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.traits;
import std.random;
void main() {
  immutable n = readln.strip.to!int;
  auto s = readln.take(n).array;
  int[] st;
  auto x = new int[n];
  auto ans = new char[n];
  foreach (i; 0 .. n) {
    if (s[i] == '(') {
      st ~= i;
      ans[i] = (st.length & 1) ? '0' : '1';
    } else {
      int j = st.back;
      st.popBack ();
      x[i] = j;
      x[j] = i;
      ans[i] = ans[j];
    }
  }
  writeln (ans);
}

