#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}
long double area(long double x1, long double y1, long double x2, long double y2,
                 long double x3, long double y3) {
  return abs(x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / 2;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  long long len = (long long)s.size();
  vector<bool> v(len, 0);
  for (long long i = len - 1; i >= 0; --i) {
    if (s[i] == 'a') {
      v[i] = 1;
      break;
    }
  }
  vector<long long> a;
  long long in = 0;
  char c = s[0];
  for (long long i = 0; i < len; ++i) {
    if (s[i] != c) {
      v[i - 1] = 1;
      c = s[i];
    }
    if (v[i]) {
      break;
    }
  }
  for (long long i = 0; i < len; ++i) {
    cout << v[i] << " ";
  }
}
