#include"stdio.h"
void main()
{int letters,space,digit,other;
letters=space=digit=other=0;
char c;
while((c=getchar())!='\n')
{if(c>='a'&&c<='z'||c>='A'&&c<='Z')
letters ++;
else if(c>=0&&c<=9)
digit++;
else if(c==' ')
space++;
else
other++;}
printf("letters=%d space=%d digit=%d other=%d\n",letters,space,digit,other);
}