#include <iostream>
#include <string>
Using namespace std;
Int main(){
Char s[100];
Int i,a,b,N,first=0 ,sec=0 
,third=0, fouth=0;
Cin>>N;
For(i=0; i<N ; i++){
Cin>>s[i] 
Switch(s[i]){
Case “AC” : first++; break;
Case “TLE”: sec++; break;
Case “WA”: third++; break;
Case “RE”: fourth++; break;
}}

For(i=0; i<N ; i++){
Switch(s[i]){

Case “AC” : cout<< “AC x “<< first<<endl   ; break;
Case “TLE”: cout<< “TLE x “<< sec<<endl   ; break;
Case “WA”: cout<< “WA x “<< third<<endl   ; break;
Case “RE”: cout<< “RE x “<< fourth<<endl   ; break;
}}


Return 0;}