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