#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(false);
  string s;
  cin >> s;
  vector<int> v(s.size());
  int i = s.size() - 1;
  int t = 0;
  for (; i >= 0; i--) {
    if (t == 0 && s[i] == 'a') {
      v[i] = 1;
      t = 1;
    } else if (t == 0 && s[i] == 'b') {
      v[i] = 0;
    } else if (t == 1 && s[i] == 'a') {
      v[i] = 0;
    } else if (t == 1 && s[i] == 'b') {
      v[i] = 1;
      t = 0;
    }
  }
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
}
