#include <iostream>
#include <sstream>
#include <cstring>
#include <map>
#include <stdio.h>
#include <algorithm>
using namespace std;
int main()
{
string str1;
getline(cin,str1);
int len=str1.size();
str1[len-1]=' ';
istringstream it(str1);
string word;
int c=0,length;
while(it >> word)
{
length=word.size();
if(c==0) printf("%d",length);
else printf(" %d",length);
c=1;
}
return 0;
}