#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = double;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cout << *it << " = " << a << endl;
  err(++it, args...);
}
const ll MODBASE = 1000000007LL;
const int MAXN = 200010;
const int MAXM = 110;
const int MAXK = 110;
string s;
vector<int> res;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(nullptr);
  cin >> s;
  int vt = 1;
  for (int i = (int((s).size()) - 1); i >= (0); i--)
    if (s[i] == 'a') {
      if (vt == 1) {
        res.emplace_back(1);
        vt = -vt;
      } else
        res.emplace_back(0);
    } else {
      if (vt == -1) {
        res.emplace_back(1);
        vt = -vt;
      } else
        res.emplace_back(0);
    }
  for (int i = (int((res).size()) - 1); i >= (0); i--) cout << res[i] << ' ';
  return 0;
}
