#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string s;
  cin >> s;
  int n = s.length();
  vector<int> v;
  for (int i = 0; i < n; i++)
    if (i == n - 1 || s[i] != s[i + 1]) v.push_back(i);
  if (s.back() == 'b') v.pop_back();
  vector<int> res(n);
  for (int p : v) res[p] = 1;
  for (int id : res) cout << id << ' ';
  cout << '\n';
  return 0;
}
