#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  int len = s.length();
  for (int i = 0; i < len; i++) {
    int should = 0;
    if (i + 1 < len) {
      if (s[i] != s[i + 1]) {
        reverse(s.begin(), s.begin() + i + 1);
        should = 1;
      }
    } else {
      if (s[i] == 'a') {
        reverse(s.begin(), s.begin() + i + 1);
        should = 1;
      }
    }
    cout << should << " ";
  }
}
