#include<stdio.h>
int main(void){
  char k[4];
  int  i,n,t[4]={};
  char s[5][5]={"AC","WA","TLE","RE"}
  for(i=0;i<n;i++){
  scanf("%s\n",k);
  if(k[0]=='A'){
    t[0]=t[0]+1;
  }else if(k[0]=='W'){
    t[1]==t[1]+1;
  }else if(k[0]=='T'){
    t[2]=t[2]+1;
  }else if(k[0]=='R'){
    t[3]=t[3]+1;
  }
  }
  i=0;
  for(i=0;i<4;i++){
    printf("%sx%d\n",s[i],t[i]);
  }
 return 0; 
}
