#include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin >> s;
int n = s.size();
for (int i = 0; i < n; i++)
{
if (s[i] == 'W')
{
int ans = 4774;
for (int j = 0; j < n; j++)
{
if (s[j] == 'C')
ans = min(ans, abs(i - j));
}
cout << ans << ' ';
}
}
cout << '\n';
return 0;
}