#include<iostream>
#include<string>
using namespace std;
int main()
{
char input_str[100]; //输入有空格的一行。cin默认以空格结束
cin.getline(input_str, 100);
int num_num = 0;
int num_letter = 0;
int num_space = 0;
int num_other = 0;
int len = strlen(input_str);
cout << "len:" << len<<endl;
for (int i = 0; i<len; i++) {
if (input_str[i] >= '0' && input_str[i] <= '9')
num_num++;
else if ((input_str[i] >= 'A' && input_str[i] <= 'Z') || input_str[i] >= 'a' && input_str[i] <= 'z')
num_letter++;
else if (input_str[i] == ' ')
num_space++;
else
num_other++;
}
cout << "letter:" << num_letter << endl;
cout << "number:" << num_num << endl;
cout << "space:" << num_space << endl;
cout << "other character:" << num_other << endl;
return 0;
}