#include <cctype>
using namespace std;
int main()
{
int Letters = 0,Digits = 0,Others = 0;
char a;
cin.get(a);
while (a != '?')
{
if(isalpha(a))
{
Letters++;
}
else if(isdigit(a))
{
Digits++;
}
else
{
Others++;
}
cin.get(a);
}
cout << "Letters=" << Letters << endl;
cout << "Digits=" << Digits << endl;
cout << "Others=" << Others << endl;
return 0;
}