#include<bits/stdc++.h>
using namespace std;
int l,d,o;
int main(){
    char c=getchar();
    while(c!='?'){
        if(c>='a'&&c<='z'||c>='A'&&c<='Z') l++;
        else if(c>='0'&&c<='9') d++;
        else o++;
        c=getchar();
    }
    cout<<"Letters="<<l<<endl<<"Digits="<<d<<endl<<"Others="<<o;
    return 0;
}