#include <bits/stdc++.h>
using namespace std;
const int Mod = 1000000007;
const int base = 227;
const int base1 = 123;
const int maxn = 2005;
char s[2005];
char ss[20005];
char sc[20005];
void solve() {
  cin >> s + 1;
  int l = strlen(s + 1);
  for (int i = 1; i <= l; i++) {
    if (i != l && s[i] != s[i + 1])
      cout << 1;
    else if (i == l && s[i] == 'a')
      cout << 1;
    else
      cout << 0;
    cout << " ";
  }
  cout << endl;
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int t = 1;
  for (int i = 1; i <= t; i++) solve();
  return 0;
}
