#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  string s;
  cin >> s;
  for (i = 0; s[i + 1]; i++) {
    if (s[i] != s[i + 1])
      cout << 1 << " ";
    else
      cout << 0 << " ";
  }
  n = s.size();
  if (s[n - 1] == 'a')
    cout << 1;
  else
    cout << 0;
}
