#include <bits/stdc++.h>
using namespace std;
string s;
int ans[1005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  int d = 0;
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] <= s[d]) d = i;
  }
  ans[d] = 1;
  for (int i = d; i > 0; --i) {
    int id = 0;
    for (int j = 1; j < i; ++j) {
      if (s[j] <= s[id]) {
        id = j;
      }
    }
    ans[id] ^= 1;
    ans[i - 1] ^= 1;
    i = id + 1;
  }
  for (int i = 0; i < s.length(); ++i) {
    cout << ans[i] << " ";
  }
  cout << endl;
}
