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