//双指针的简单应用:j用于条件判断,i用于确保遍历
#include <iostream>
#include <cstring>
using namespace std;
int main(){
string s;
getline(cin,s);
for(int i=0,j=0;i<s.size();i++){
if(s[i] == ' ')
continue;
j = i+1;
while(j < s.size() && s[j] != ' ')
j++;
int len = j - i;
if(s[j-1] == '.') len--;
cout << len << " ";
i = j;
}
return 0;
}