using namespace std;
#define int long long
#define endl '\n'
signed main(){
std::ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
char s;
int letter=0,digits=0,other=0;
while(cin.get(s)&&s!='?'){//用cin.get是处理空格也是一个字符,用cin不能算空格是字符。如果用s=getchar()会运行超时,不过把getchar写在循环下面就不会超时了
if((s>='a'&&s<='z')||(s>='A'&&s<='Z'))letter++;
else if(s>='0'&&s<='9')digits++;
else other++;
}
cout<<"Letters="<<letter<<endl;
cout<<"Digits="<<digits<<endl;
cout<<"Others="<<other<<endl;
return 0;
}