#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int maxn = 1e5 + 10;
string s;
int main() {
  std::ios::sync_with_stdio(0);
  ;
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  if (s.size() == 1) {
    return cout << 1 << "\n", 0;
  }
  bool af = 0;
  for (int i = 0; i < s.size() - 1; i++) {
    if (s[i] == 'b' && s[i + 1] == 'a') {
      cout << 1 << " ";
    } else if (s[i] == 'a' && s[i + 1] == 'b') {
      cout << 1 << " ";
    } else {
      cout << 0 << " ";
    }
  }
  if (s[s.size() - 1] == 'b') {
    cout << 0;
  } else {
    cout << 1;
  }
}
