#include <bits/stdc++.h>
using namespace std;
void read(long long &number) {
  bool negative = false;
  long long c;
  number = 0;
  c = getchar();
  while (c == ' ' || c == '\n') c = getchar();
  if (c == '-') {
    negative = true;
    c = getchar();
  }
  for (; (c > 47 && c < 58); c = getchar()) number = number * 10 + c - 48;
  if (negative) number = -number;
}
template <class T1, class T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &a) {
  return os << '(' << a.first << ", " << a.second << ')';
}
template <class T>
ostream &operator<<(ostream &os, const vector<T> &a) {
  os << '[';
  for (unsigned long long i = 0; i < a.size(); i++)
    os << a[i] << (i < a.size() - 1 ? ", " : "");
  os << ']';
  return os;
}
template <class T>
ostream &operator<<(ostream &os, const set<T> &a) {
  os << '{';
  for (typename set<T>::iterator it = a.begin(); it != a.end(); it++) {
    typename set<T>::iterator jt = it;
    os << *it << (++jt != a.end() ? ", " : "");
  }
  os << '}';
  return os;
}
template <class T1, class T2>
ostream &operator<<(ostream &os, map<T1, T2> &a) {
  os << "{\n";
  for (typename map<T1, T2>::iterator it = a.begin(); it != a.end(); it++) {
    typename map<T1, T2>::iterator jt = it;
    os << "  " << it->first << ": " << it->second
       << (++jt != a.end() ? ",\n" : "\n");
  }
  os << '}';
  return os;
}
string s;
bool ans[1005];
deque<char> c;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  c.push_back(s[0]);
  for (long long i = (long long)1; i <= (long long)s.size() - 1; i++) {
    if (s[i] == c.back())
      c.push_back(s[i]);
    else {
      ans[i - 1] = true;
      reverse(c.begin(), c.end());
      c.push_back(s[i]);
    }
  }
  if (c.front() > c.back()) {
    ans[s.size() - 1] = true;
    reverse(c.begin(), c.end());
  }
  for (long long i = (long long)0; i <= (long long)s.size() - 1; i++)
    cout << ans[i] << ' ';
  cout << '\n';
}
