#include <stdio.h>
#include <string.h>
//subgoals
//1. scan semua input
//2. cari jumlah AC,WA,TLE,RE

int main (){
	scanf ("%d",&N)
	
	for (int i=0; i<N;i++){
	
	char str [255];
	scanf ("%s",str);
	
	if(strcmp(str"AC")==0){//"AC" - "AC"=0
		AC++;
	}else if (strcmp(str,"WA")==0){ //if str it WA
		WA++;
	}else if (strcmp(str,"TLE")==0){//if str it TLE
		TLE++;
	}else if (strcmp(str,"RE")==0){//if str it RE
 		RE++;
	}
}
	printf("ACx%d\",AC);
	printf("WAx%d\",WA);
	printf("TLEx%d\",TLE);
	printf("REx%d\",RE);
	
	return 0;
}