#include <bits/stdc++.h>
using namespace std;
string s;
string f[1005];
int ans[1005];
int main() {
  cin >> s;
  int n = s.length();
  f[0] = string(s, 0, 1);
  for (int i = 1; i < n; i++)
    f[i] = min(string(s, i, 1) + f[i - 1], f[i - 1] + string(s, i, 1));
  bool rev = 0;
  for (int i = n - 1; i > 0; i--)
    if (string(s, i, 1) + f[i - 1] < f[i - 1] + string(s, i, 1)) {
      ans[i - 1] ^= 1;
      ans[i] ^= 1;
    }
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
