#include <bits/stdc++.h>
const int Inf = 1e9;
long long LINF = (long long)4e18;
using namespace std;
long long mod = 1e9 + 7;
long long mod2 = 1e9 + 123;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  map<char, vector<int>> pos;
  for (int i = 0; i < s.size(); i++) {
    pos[s[i]].push_back(i);
  }
  char c = pos.begin()->first;
  sort(pos[c].rbegin(), pos[c].rend());
  vector<int> ans(s.size(), 0);
  while (pos[c].size()) {
    int i = pos[c].back();
    pos[c].pop_back();
    if (pos[c].size()) {
      if (pos[c].back() - i == 1) continue;
      ans[pos[c].back() - 1] = 1;
    }
    if (i != 0) {
      ans[i] = 1;
    }
  }
  for (auto v : ans) cout << v << ' ';
  return 0;
}
