#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, n, x[1005];
  bool isb = true;
  string s;
  cin >> s;
  n = s.length();
  memset(x, 0, sizeof x);
  for (i = 0; i < n; i++) {
    if (s[i] == 'b') {
      if (!isb) {
        x[i] = 1;
      }
      isb = true;
    } else {
      if (isb) {
        x[i] = 1;
      }
      isb = false;
    }
  }
  if (!isb)
    x[i] = 1;
  else
    x[i] = 0;
  for (i = 1; i <= n; i++) {
    cout << x[i] << " ";
  }
  cout << endl;
}
