#include <iostream>
using namespace std;
int main(){
int letter, space, digit, other;
char ch;
letter = space = digit = other = 0;
while ((ch = getchar ()) != '\n') {
if (ch>='a' && ch <= 'z' || ch>='A'&&ch<='Z') letter++;
else if (ch>='0' && ch <='9') digit++;
else if (ch == ' ') space++;
else other++;
}
printf ("字母:%d\n", letter);
printf ("空格:%d\n", space);
printf ("数字:%d\n", digit);
printf ("其它字符:%d\n", other);
return 0;
}