#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  long long n = s.length();
  long long arr[n];
  for (int i = 0; i < n; i++) {
    arr[i] = 0;
  }
  long long i = 0;
  while (i < n) {
    if (s[i] == 'a') {
      if (i > 0) arr[i - 1] = 1;
      while (i < n && s[i] == 'a') i++;
      arr[i - 1] = 1;
    }
    i++;
  }
  for (int i = 0; i < n; i++) cout << arr[i] << " ";
  cout << endl;
  return 0;
}
