#include <bits/stdc++.h>
using namespace std;
int inf = 1000000009;
long long mod = 998244353;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m, p, k;
  string s, q;
  cin >> s;
  n = s.length();
  ;
  string ff, ss, nach;
  for (int i = 0; i < n; i++) ff += '0', ss += '0', nach += '0';
  string mayma;
  mayma += s[0];
  string maymi;
  maymi += s[0];
  string tek;
  tek += s[0];
  for (int i = 1; i < n; i++) {
    tek += s[i];
    string myma = mayma + s[i];
    string mymi = maymi + s[i];
    string rmyma = myma;
    reverse(rmyma.begin(), rmyma.end());
    string rmymi = mymi;
    reverse(rmymi.begin(), rmymi.end());
    string fnew = nach, snew = nach;
    string mi = tek, ma = tek;
    if (mi > mymi) {
      mi = mymi;
      fnew = ff;
    }
    if (mi > rmyma) {
      mi = rmyma;
      fnew = ss;
      fnew[i] = '1';
    }
    if (ma < myma) {
      ma = myma;
      snew = ss;
    }
    if (ma < rmymi) {
      ma = rmymi;
      snew = ff;
      snew[i] = '1';
    }
    mayma = ma;
    maymi = mi;
    ff = fnew;
    ss = snew;
  }
  for (int i = 0; i < n; i++) cout << ff[i] << " ";
}
