#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
long long A[100005 * 10];
long long B[100005 * 10];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long tst = 1;
  for (long long tt = 1; tt <= tst; tt++) {
    string s;
    cin >> s;
    for (long long i = 1; i < ((long long)(s).size()); i++) {
      if (s[i] == 'a') {
        if (s[i - 1] == 'b') A[i - 1] = 1;
        long long j = i;
        while (j < ((long long)(s).size()) && s[j] == 'a') j++;
        A[j - 1] = 1;
        i = j - 1;
      }
    }
    for (long long i = 0; i < ((long long)(s).size()); i++)
      cout << A[i] << (i + 1 < ((long long)(s).size()) ? ' ' : '\n');
    ;
  }
  return 0;
}
