#include <bits/stdc++.h>
using namespace std;
int main() {
  string t;
  cin >> t;
  string b = "", w = "";
  vector<int> rb, rw;
  for (int i = 1; i <= t.size(); ++i) {
    string cw = b + t[i - 1];
    string cb = w + t[i - 1];
    reverse(cb.begin(), cb.end());
    reverse(cw.begin(), cw.end());
    if (b + t[i - 1] >= cb) {
      rb = vector<int>(rw.begin(), rw.begin() + i - 1);
      rb.push_back(1);
      b = cb;
    } else {
      rb.push_back(0);
      b += t[i - 1];
    }
    if (w + t[i - 1] <= cw) {
      rw = vector<int>(rb.begin(), rb.begin() + i - 1);
      rw.push_back(1);
      w = cw;
    } else {
      rw.push_back(0);
      cw += t[i - 1];
    }
  }
  for (int i = 0; i < rb.size(); ++i) printf("%d ", rb[i]);
  return 0;
}
