#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = 1;
    c = getchar();
  }
  while (c >= '0' && c <= '9')
    x = (x << 3) + (x << 1) + (c ^ '0'), c = getchar();
  return f ? -x : x;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
const long long N = 1e3 + 10;
char s[N];
long long ans[N], len, x;
bool f;
signed main() {
  cin >> s + 1;
  len = strlen(s + 1);
  ans[1] = 0;
  f = s[1] == 'a';
  for (register long long i = 2; i < len; ++i)
    if (f)
      if (s[i + 1] == 'a')
        ans[i] = 1, f ^= 1;
      else
        ans[i] = 0;
    else if (s[i + 1] == 'b')
      ans[i] = 1, f ^= 1;
    else
      ans[i] = 0;
  ans[len] = s[len] == 'a';
  for (register long long i = 1; i <= len; ++i) cout << ans[i] << " ";
  return 0;
}
