#include <bits/stdc++.h>
clock_t t_;
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main(int argc, const char* argv[]) {
  t_ = clock();
  string s;
  cin >> s;
  string ret = "";
  ret += s[0];
  int j = 1;
  int n = s.length();
  vector<int> ans(n);
  ans[0] = 0;
  vector<int> ind;
  int rev = 0;
  while (j < n) {
    if (s[j] <= ret[0]) {
      ans[j - 1] ^= 1;
      ans[j] = 1;
      ret = s[j] + ret;
    } else {
      ans[j] = 0;
      ret += s[j];
    }
    j++;
  }
  for (int i = int(0); i < int(n); i++) cout << ans[i] << " ";
  cout << "\n";
  t_ = clock() - t_;
  cerr << setprecision(9) << fixed << ((float)t_ / CLOCKS_PER_SEC) << endl;
  return 0;
}
