#include <bits/stdc++.h>
using namespace std;
template <typename tp>
void read(tp& dig) {
  char ch = getchar();
  dig = 0;
  long long flag = 0;
  while (!isdigit(ch)) {
    if (ch == '-') flag = 1;
    ch = getchar();
  }
  while (isdigit(ch)) dig = dig * 10 + ch - '0', ch = getchar();
  if (flag) dig = -dig;
}
char s[200010];
int ans[200010];
int main() {
  scanf("%s", s + 1);
  int n = strlen(s + 1);
  for (int i = 1; i <= n; ++i)
    if (s[i] == 'a') {
      ans[i - 1] = 1;
      while (s[i + 1] == 'a') ++i;
      ans[i] = 1;
    }
  for (int i = 1; i <= n; ++i) printf("%d ", ans[i]);
  putchar(10);
  return 0;
}
