#include<stdio.h>
#define IN 1
#define OUT 0
void main()
{
int c, nl,nw,n,state;
state=OUT;
nl=nw=n=0;
c=getchar();
while(c!=EOF)
{
if(c=='\n')
nl++;
if(c!=' '&&c!='\n'&&c!='\t')
{
state=IN;
nw++;
}
else
{
state=OUT;
n++;
}
c=getchar();
}
printf("%d %d %d\n",nl,nw,n);
}