#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e3 + 5;
string s;
int ans[MAX];
int main() {
  cin >> s;
  int ca = 0, cb = 0;
  if (s[0] == 'a')
    ca += 1;
  else
    cb += 1;
  for (int i = 1; i < (int)s.size(); i++) {
    if (s[i] == 'a') {
      ans[i - 1] ^= 1;
      ans[i] = 1;
    }
  }
  for (int i = 0; i < (int)s.size(); i++) {
    cout << ans[i] << " ";
  }
  cout << "\n";
  return 0;
}
