#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]);
    
    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;
}