#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
long long inf = 2e18;
string to_string(long long x) {
  stringstream second;
  second << x;
  return second.str();
}
long long to_integer(string s) {
  stringstream second(s);
  long long x;
  second >> x;
  return x;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s;
  cin >> s;
  long long ans[s.size()];
  memset(ans, 0, sizeof ans);
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] == 'a') {
      while (i < s.size() && s[i] == 'a') i++;
      ans[i - 1] = 1;
      if (i < s.size() && s[i] == 'b') {
        while (i < s.size() && s[i] == 'b') i++;
        i--;
        ans[i] = 1;
      }
    }
  }
  if (s[s.size() - 1] == 'b') {
    if (ans[s.size() - 1] == 1)
      ans[s.size() - 1] = 0;
    else
      ans[s.size() - 1] = 1;
  }
  for (long long i = 0; i < s.size(); i++) cout << ans[i] << " ";
  return 0;
}
