#include<stdio.h>
#include<string.h>

int main(void){
    int N,c0=0,c1=0,c2=0,c3=0;
    int s;
    if((scanf("%d",&N)!=1)||(N<0||100000<N)) return -1;
    char s[N][5];

    for(int i = 0;i<N;i++){
        s = scanf("%s",s[i]);
        if((s == 2)||(s==3)){
        if(strcmp(s[i],"AC")==0) c0++;
        else if(strcmp(s[i],"WA")==0) c1++;
        else if(strcmp(s[i],"TLE")==0) c2++;
        else if(strcmp(s[i],"RE")==0) c3++;
        else return -1;
    }else return -1;
    }
    printf("AC×%d\nWA×%d\nTLE×%d\nRE×%d\n",c0,c1,c2,c3);
    return 0;
}
