#include <bits/stdc++.h>
using namespace std;
const long long INF = 2e18;
const double EPS = 1e-9;
const double PI = 3.14159265359;
const long long MOD = 998244353;
const int MAXON = 102;
const int IGOR = 21;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  int n = s.size();
  char cur = s[0];
  vector<int> a;
  for (int i = 1; i < n; ++i) {
    if (cur != s[i]) {
      a.push_back(i - 1);
    }
    cur = s[i];
  }
  if (!a.size() || a.back() != n - 1) a.push_back(n - 1);
  if (s[n - 1] == 'b') a.pop_back();
  vector<int> ans(n, 0);
  for (auto i : a) ans[i] = 1;
  for (auto i : ans) cout << i << " ";
  return 0;
}
