#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
int main(int argc, char* argv[])
{
char str[1001];
int a[101];
int i,k;
char *p;
int count;
while(gets(str))
{
p = str;
count = 0;
k = 0;
while(*p != '.')
{
if(*p != ' ' && (*(p+1) == '.' || *(p+1) == ' '))
{
count++;
a[k++] = count;
count = 0;
}
if(*p != ' ' && *(p+1) != '.' && *(p+1) != ' ')
{
count++;
}
p++;
}
for(i=0;i<k-1;i++)
printf("%d ",a[i]);
printf("%d\n",a[k-1]);
}
return 0;
}