#include <bits/stdc++.h>
using namespace std;
long long n;
string s;
void solve() {
  cin >> s;
  n = (int)s.size();
  for (__typeof((n)) i = (1); i < (n); i++) cout << (s[i] != s[i - 1]) << " ";
  cout << (s[n - 1] == 'a') << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
  return 0;
}
