#include <bits/stdc++.h>
using namespace std;
const int N = 2000010, mod = 1e9 + 7;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 1) + (x << 3) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
int n, ans[N];
char s[N];
priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>>
    q;
bool vis[N];
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (int i = 1; i <= n; ++i) {
    q.push({s[i] - 'a', -i});
  }
  ans[-q.top().second] = 1;
  int pos = -q.top().second;
  q.pop();
  while (q.size()) {
    auto u = q.top();
    q.pop();
    u.second = -u.second;
    if (u.second > pos) continue;
    ans[pos - 1] ^= 1;
    ans[u.second] ^= 1;
    pos = u.second;
  }
  for (int i = 1; i <= n; ++i) cout << ans[i] << ' ';
  return 0;
}
