#include <bits/stdc++.h>
using namespace std;
int n, c;
string s;
vector<int> u;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> s;
  n = s.length();
  u.assign(n, 0);
  c = 0;
  for (int i = n - 1; i >= 0; --i) {
    if ((s[i] == 'a' && c == 0) || (s[i] == 'b' && c == 1)) {
      u[i] = 1;
      c ^= 1;
    }
  }
  for (int i = 0; i < n; ++i) cout << u[i] << " ";
  return 0;
}
