#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  int n;
  cin >> s;
  n = s.size();
  s = s + 'b';
  for (int i = 0; i < n; i++) {
    cout << (s[i] != s[i + 1] ? 1 : 0) << " ";
  }
  return 0;
}
