#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[1111];
  cin >> s;
  int len = strlen(s);
  char pre = s[len - 1];
  if (pre == 'a') {
    s[len - 1] = '1';
  } else {
    s[len - 1] = '0';
  }
  for (int i = len - 2; i >= 0; i--) {
    if (s[i] != pre) {
      pre = s[i];
      s[i] = '1';
    } else {
      pre = s[i];
      s[i] = '0';
    }
  }
  for (int i = 0; i < len; i++) {
    cout << s[i] << " ";
  }
  return 0;
}
