#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k, i, j, m, x = 0, y, maxx = 0, a[1000] = {0};
  string s;
  cin >> s;
  for (i = 0; i < s.length() - 1; i++) {
    if (s[i] == 'a' && s[i + 1] == 'b') a[i] = 1;
    if (s[i] == 'b' && s[i + 1] == 'a') a[i] = 1;
  }
  if (s[s.length() - 1] == 'a') a[s.length() - 1] = 1;
  for (i = 0; i < s.length(); i++) {
    cout << a[i] << ' ';
  }
}
