#include <bits/stdc++.h>
using namespace std;
inline void read(int &x) {
  x = 0;
  int f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  x *= f;
}
inline void judge() {
  freopen("in.txt", "r", stdin);
  freopen("out.txt", "w", stdout);
}
string s;
const int maxn = 1005;
int ans[maxn];
int main() {
  cin >> s;
  int n = s.length();
  int sta = 0;
  for (int i = (1); i <= (n - 1); i++) {
    if (s[i] == 'a') {
      if (sta == 0) {
        ans[i - 1] = 1;
        sta = 1;
      } else {
        ans[i - 1] = 0;
        sta = 1;
      }
    } else {
      if (sta == 0) {
        sta = 0;
      } else {
        ans[i - 1] = 1;
        sta = 0;
      }
    }
  }
  ans[n - 1] = sta;
  for (int i = (0); i <= (n - 1); i++) printf("%d ", ans[i]);
  return 0;
}
