#include <bits/stdc++.h>
using namespace std;
int n;
char x[1005];
string s[1005][2], ss[4];
vector<int> v[1005][2], vv[4];
int main() {
  scanf("%s", x);
  n = strlen(x);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 2; j++) {
      ss[j] = ss[j + 2] = s[i][j];
      vv[j] = vv[j + 2] = v[i][j];
      ss[j].push_back(x[i]);
      ss[j + 2].push_back(x[i]);
      reverse(ss[j + 2].begin(), ss[j + 2].end());
      vv[j].push_back(0);
      vv[j + 2].push_back(1);
    }
    s[i + 1][0] = ss[0];
    v[i + 1][0] = vv[0];
    for (int j = 1; j < 4; j++)
      if (ss[j] < s[i + 1][0]) {
        s[i + 1][0] = ss[j];
        v[i + 1][0] = vv[j];
      }
    s[i + 1][1] = ss[0];
    v[i + 1][1] = vv[0];
    for (int j = 1; j < 4; j++)
      if (ss[j] > s[i + 1][1]) {
        s[i + 1][1] = ss[j];
        v[i + 1][1] = vv[j];
      }
  }
  for (int i = 0; i < n; i++)
    printf("%d%c", v[n][0][i], i == n - 1 ? '\n' : ' ');
  return 0;
}
