#include <bits/stdc++.h>
using namespace std;
int a[1005];
int main() {
  long long int i, n, j;
  char s[1000];
  cin >> s;
  n = strlen(s);
  for (i = 1; i < n; i++) {
    if (s[i] == 'a') {
      a[i - 1] ^= 1;
      a[i] = 1;
    }
  }
  for (i = 0; i < n; i++) cout << a[i] << " ";
}
