#include <bits/stdc++.h>
using namespace std;
void debugvi(vector<long long>& v) {
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  cout << endl;
}
void debugvvi(vector<vector<long long> >& v) {
  for (int i = 0; i < v.size(); i++) {
    debugvi(v[i]);
  }
  cout << endl;
}
bool operator<(pair<long long, long long>& p1, pair<long long, long long>& p2) {
  return p1.first < p2.first;
}
int main() {
  string s;
  cin >> s;
  long long n = s.size();
  vector<long long> ans(n, 0);
  bool aBack = false;
  for (int i = 0; i < n; i++) {
    bool nextA = false;
    if (i < (n - 1) && s[i + 1] == 'a') {
      nextA = true;
    }
    if (aBack != nextA) {
      ans[i] = 1;
      aBack = (!aBack);
    }
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
}
