#include <bits/stdc++.h>
using namespace std;
#pragma warning(disable : 4996)
int main() {
  ios_base::sync_with_stdio(false);
  string s;
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == 'a') {
      if (i == s.length() - 1 || s[i + 1] == 'b')
        cout << "1 ";
      else
        cout << "0 ";
    } else {
      if (i + 1 < s.length() && s[i + 1] == 'a')
        cout << "1 ";
      else
        cout << "0 ";
    }
  }
  return 0;
}
