#include <stdio.h>

int main(void){
  int N;
  scanf("%d", &N);
  int c0 = 0;
  int c1 = 0;
  int c2 = 0;
  int c3 = 0;

  char s[N][128];
  for(int i = 0; i < N; i++){
    scanf("%s", s[i]);
  }

  for(int i = 0; i < N; i++){
    if(!strcmp(s[i], "AC")){
      c0++;
    }
    else if(!strcmp(s[i], "WA")){
      c1++;
    }
    else if(!strcmp(s[i], "TLE")){
      c2++;
    }
    else if(!strcmp(s[i], "RE")){
      c3++;
    }
  }
  printf("AC × %d\n", c0);
  printf("WA × %d\n", c1);
  printf("TLE × %d\n", c2);
  printf("RE × %d\n", c3);

  return 0;
}
