#include
int main(void)
{
int space=0,enter=0,other=0;
char a;
while(a=getchar()!='#')
{
if (a==' ')
space++;
if (a=='\n')
enter++;
(a!=' '&&a!='\n')?(other++):(break);
}
printf("%d%d%d",space,enter,other);
return 0;
}