#include <bits/stdc++.h>
using namespace std;
string s;
int j, ans[10000];
int main() {
  cin >> s;
  for (int i = 1; i < s.size(); ++i) {
    if (s[i] == 'a') {
      ans[i - 1] = 1;
      j = i;
      while (s[j + 1] == 'a') {
        j++;
      }
      ans[j] = 1;
      i = j;
    }
  }
  for (int i = 0; i < s.size(); ++i) {
    cout << ans[i] << " ";
  }
}
