#define ll long long
int main(){
    int n,c0=0,c1=0,c2=0,c3=0;
    cin>>n;
    string v[n];
    for(int i=0;i<n;i++){
    cin>>v[i];
    }
    for(int i=0;i<n;i++){
        if(v[i]=="AC") c0++;
        if(v[i]=="WA") c1++;
        if(v[i]=="TLE") c2++;
        if(v[i]=="RE") c3++;
    }
    cout<<"AC x "<<c0<<"/nWA x "<<c1<<"/nTLE x "<<c2<<"/nRE x "<<c3;
    return 0;
}