#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 5;
char s[N];
int main() {
  scanf("%s", s);
  int n = strlen(s);
  s[n++] = 'b';
  for (int i = 0; i < n - 1; i++) printf("%d ", s[i] == s[i + 1] ? 0 : 1);
  printf("\n");
}
