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