#include <bits/stdc++.h>
const long long maxn = 100010;
const long long inf = 1e18;
const long long mod = 998244353;
inline long long read() {
  register long long x = 0, g = 1;
  register char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') g = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (((x << 2) + x) << 1) + (ch ^ '0');
    ch = getchar();
  }
  return x * g;
}
char s[maxn];
static long long ans[maxn];
signed main() {
  scanf("%s", s + 1);
  long long len = strlen(s + 1);
  for (long long i = 2; i <= len; ++i) {
    if (s[i] == 'a') {
      ans[i - 1] ^= 1;
      ans[i] = 1;
    }
  }
  for (long long i = 1; i <= len; ++i) printf("%I64d ", ans[i]);
  return 0;
}
