#include <bits/stdc++.h>
using namespace std;
bool write[1000];
int main() {
  string s;
  cin >> s;
  for (int i = 1; i < s.size(); i++)
    if (s[i] == 'a') {
      write[i - 1] ^= 1;
      write[i] = 1;
    }
  for (int i = 0; i < s.size(); i++) cout << write[i] << " ";
}
