#include <bits/stdc++.h>
long long minn = INT_MAX;
long long maxx = INT_MIN;
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s;
  cin >> s;
  long long l = s.size();
  vector<long long> ans(l, 0);
  bool flag = false;
  for (long long i = 0; i < l - 1; i++) {
    if (s[i] == 'b' && s[i + 1] == 'a')
      ans[i] = 1, flag = true;
    else if (s[i] == 'a' && s[i + 1] == 'b' && flag == true)
      ans[i] = 1, flag = false;
  }
  if (flag) ans[l - 1] = 1;
  for (long long i = 0; i < l; i++) cout << ans[i] << " ";
  return 0;
}
