#include<stdio.h>
#include<string.h>
 
int main(void)
{
    int i, num;
    int count1=0, count2=0, count3=0, count4=0;
    char str[4];
    
    scanf("%d", &num);
    for(i=0; i<num; i++) {
        scanf("%s", str);
        if (strcmp(str, "AC") == 0) {
            count1++;
        } else if (strcmp(str, "WA") == 0) {
            count2++;
        } else if (strcmp(str, "TLE") == 0) {
            count3++;
        } else {
            count4++;
        }
    }
    
    printf("AC × %d\n", count1);
    printf("WA × %d\n", count2);
    printf("TLE × %d\n", count3);
    printf("RE × %d\n", count4);
 
    return 0;
}
#include<stdio.h>
#include<string.h>

int main(void)
{
    int i, num=0;
    int count1=0, count2=0, count3=0, count4=0;
    char str[4];
    
    scanf("%d", &num);

    for(i=0; i<num; i++) {
        scanf("%s", str);
        if (strcmp(str, "AC") == 0) {
            count1++;
        } else if (strcmp(str, "WA") == 0) {
            count2++;
        } else if (strcmp(str, "TLE") == 0) {
            count3++;
        } else {
            count4++;
        }
    }
    
    printf("AC × %d\n", count1);
    printf("WA × %d\n", count2);
    printf("TLE × %d\n", count3);
    printf("RE × %d\n", count4);

    return 0;
}