#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  string t = "";
  string t1 = "";
  cin >> s;
  string res = "";
  string res1 = "";
  for (int i = 0; i <= s.length() - 1; i++) {
    string t2 = s[i] + t1;
    string t3 = t + s[i];
    string pres, pres1;
    if (t3 < t2) {
      t2 = t3;
      pres1 = res + "1 ";
    } else
      pres1 = res1 + "0 ";
    t3 = t + s[i];
    string t4 = s[i] + t1;
    if (t4 < t3) {
      t3 = t4;
      pres = res1 + "1 ";
    } else
      pres = res + "0 ";
    t1 = t2;
    t = t3;
    res = pres;
    res1 = pres1;
  }
  cout << res << endl;
}
