#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t;
  t = 1;
  for (int tc = 0; tc < t; tc++) {
    string str, ss = "";
    cin >> str;
    int n = str.size();
    vector<int> v(n, 0);
    for (int i = 0; i < n;) {
      if (str[i] == 'b') {
        ss += "b";
        i++;
        continue;
      } else {
        if (i - 1 >= 0) {
          v[i - 1] = 1;
          reverse(ss.begin(), ss.end());
          int j = i;
          while (j < n && str[j] == 'a') {
            ss += "a";
            j++;
          }
          v[j - 1] = 1;
          reverse(ss.begin(), ss.end());
          i = j;
        } else {
          ss += str[i];
          i++;
        }
      }
    }
    for (int i = 0; i < (int)v.size(); i++) cout << v[i] << " ";
    cout << "\n";
    ;
  }
  return 0;
}
