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