#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
string str;
getline(cin, str);
int n = str.length();
vector<int> myvector;
// cout << n << " ";
myvector.push_back(n);
int count = 0;
char w = str[0]; // 标识0或1;
for (int j = 0; j < n; j++)
{
if (str[j] == w)
{
count++;
}
else
{
myvector.push_back(count);
// cout << count << endl;
count = 1;
w = str[j];
}
}
for (int i = 0; i < n - 1; i++)
{
// cin >> str;
getline(cin, str);
// cout << str << endl;
for (int j = 0; j < n; j++)
{
if (str[j] == w)
{
count++;
}
else
{
myvector.push_back(count);
// cout << count << endl;
count = 1;
w = str[j];
}
}
}
// if (str[n - 2] == str[n - 1])
myvector.push_back(count);
for (vector<int>::iterator it = myvector.begin(); it != myvector.end(); it++)
{
cout << *it << " ";
}
}