#include<iostream>
#include<string>
using namespace std;
void main()
{
string s;
getline(cin, s);
int letter=0, number=0, space=0, other=0;
for (size_t i = 0; i != s.size(); ++i)
{
if (s[i] >= 'a'&&s[i] <= 'z' || s[i] >= 'A'&&s[i] <= 'Z')
letter++;
else if (s[i] >= '0' && s[i] <= '9')
number++;
else if (s[i] == ' ')
space++;
else other++;
}
cout << "letter:" << letter << endl;
cout << "number:" << number << endl;
cout << "space:" << space << endl;
cout << "other:" << other << endl;
}