#include <bits/stdc++.h>
using namespace std;
string s;
int cnt_a;
int ans[1001];
int main() {
  cin >> s;
  for (int i = 0; i < s.length(); i++)
    if (s[i] == 'a') cnt_a++;
  int n = s.length();
  s += "b";
  for (int i = 1; i < s.length(); i++) {
    if (s[i] == 'a' && s[i - 1] == 'b') ans[i - 1]++;
    if (s[i] == 'b' && s[i - 1] == 'a') ans[i - 1]++;
  }
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  return 0;
}
