#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  string str;
  cin >> str;
  long long n = str.length();
  vector<long long> res(n, 0);
  for (long long i = 1; i < n; i++) {
    if (str[i] == 'a') {
      res[i - 1] ^= 1;
      res[i] = 1;
    }
  }
  for (long long i = 0; i < n; i++) {
    cout << res[i] << " ";
  }
  return 0;
}
