#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 110;
const int MAXN = 110;
const int inf = 0x7fffffff;
const double eps = 1e-8;
const int maxn = 1010;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 3) + (x << 1) + ch - '0';
    ch = getchar();
  }
  return x * f;
}
char s[maxn];
int main() {
  scanf("%s", s);
  int len = strlen(s);
  s[len] = 'b';
  for (register int i = 0; i < len; i++) {
    if (s[i] == 'a' && s[i + 1] == 'b' || s[i] == 'b' && s[i + 1] == 'a')
      printf("1 ");
    else
      printf("0 ");
  }
  return 0;
}
