#include <bits/stdc++.h>
using namespace std;
string s;
long long n;
long long ans[2002];
void solve(long long x, long long y, long long st) {
  if (x >= y) return;
  long long yo;
  if (st == 0)
    yo = 100;
  else
    yo = -1;
  for (long long i = y; i >= x; i--) {
    if (st == 1) {
      yo = max(yo, (long long)(s[i] - 'a'));
    } else if (st == 0) {
      yo = min(yo, (long long)(s[i] - 'a'));
    }
  }
  for (long long i = y; i >= x; i--) {
    if ((long long)(s[i] - 'a') == yo) {
      ans[i] = 1;
      solve(x, i - 1, 1 - st);
      return;
    }
  }
}
int main() {
  cin >> s;
  n = s.length();
  solve(0, n - 1, 0);
  for (long long i = 0; i < n; i++) cout << ans[i] << " ";
  return 0;
}
