#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1010;
const int INF = 0x3f3f3f3f;
int ans[MAXN];
int main() {
  string str;
  cin >> str;
  for (int i = 0; str[i]; i++) {
    if (str[i] == 'a' && str[i + 1] == 'b')
      ans[i] = 1;
    else if (str[i] == 'b' && str[i + 1] == 'a')
      ans[i] = 1;
  }
  int len = str.length();
  if (str[len - 1] == 'a') ans[len - 1] = 1;
  for (int i = 0; i < str.length(); i++) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
