#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string second;
  cin >> second;
  vector<long long> ans(second.length(), 0);
  for (long long i = 1; i < second.length(); i++) {
    if (second[i] == 'a') {
      ans[i]++;
      ans[i - 1]++;
    }
  }
  for (long long i = 0; i < second.length(); i++) {
    cout << ans[i] % 2 << ' ';
  }
}
