#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  int n = s.size();
  bool check = 0;
  for (int i = 0; i < n; i++)
    if (s[i] == 'a') check = 1;
  if (!check) {
    for (int i = 0; i < n; i++) cout << 0 << ' ';
    return 0;
  }
  vector<bool> ans(n);
  if (s[n - 1] == 'a') ans[n - 1] = 1;
  for (int i = 1; i < n - 1; i++)
    if ((s[i] == 'a' && s[i + 1] == 'b') || (s[i] == 'b' && s[i + 1] == 'a'))
      ans[i] = 1;
  for (auto x : ans) cout << x << ' ';
  return 0;
}
