#include<stdio.h>

int main(){
  
  int N;
  int AC;
  int WA;
  int TLE;
  int RE;
  
  scanf("%d\n",&N);
  
  char test[N];
  
  for(int i = 0; i < N; i++){
    scanf("%s\n","test[i]");
  }
  
  for(int i = 0; i < N; i++){
    if("AC" == test[i]){
      AC = AC +1;
      
    }else if("WA" == test[i]){
      WA = WA + 1;
      
    }else if("TLE" == test[i]){
      TLE = TLE + 1;
      
    }else if("RE" == test[i]){
      RE = RE + 1;
      
    }
  }
  
  printf("AC × %d\n", &AC);
  printf("WA × %d\n", &WA);
  printf("TLE × %d\n", &TLE);
  printf("RE × %d\n", &RE);
  
  return 0;
}