#include <bits/stdc++.h>
using namespace std;
string s;
bool shouldReverse(const int ed) {
  for (int i = 0, j = ed; i <= ed; ++i, --j) {
    if (s[j] < s[i])
      return true;
    else if (s[j] > s[i])
      return false;
  }
  return false;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  cin >> s;
  vector<bool> ans(s.size());
  for (int i = 0; i < (int)s.size(); ++i) {
    int j = i;
    while (j < (int)s.size() && s[j] == s[i]) {
      ++j;
    }
    if (s[i] == 'b' && j == s.size())
      ;
    else
      ans[j - 1] = true;
    i = j - 1;
  }
  for (const bool &i : ans) {
    cout << i << ' ';
  }
  cout << '\n';
  return 0;
}
