#include
int main()
{ char c;
int zm=0,kg=0,sz=0,qt=0;
while((c=getchar())!='\n')
switch ((c>='A'&&c<='Z'||c>='a'&&c<='z')+2*(c>='0'&&c<='9')+3*(c==' '))
{case 1:zm++;break;
case 2:sz++;break;
case 3:kg++;break;
default:qt++;
}
printf("字母:%d\n空格:%d\n数字:%d\n其它:%d\n",zm,kg,sz,qt);
return 0;
}