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