#include <stdio.h>
int main(){
  int N=0,i=0,countAC=0,countWA=0,countTLE=0,countRE=0;
  char str[100000];
    scanf("%d",&N);
  for(i=1;i<=N;i++){
    scanf("%s",str);
    if((str[0]==A)&&(str[1]==C)){
      countAC++;
    }else if((str[0]==W)&&(str[1]==A)){
      countWA++;
    }else if((str[0]==R)&&(str[1]==E)){
      countRE++;
    }else if((str[0]==T)&&(str[1]==L)&&(str[2]==E)){
      countTLE++;
    }
  }
  printf("AC x %d/nWA x %d/nTLE x %d/nRE x %d/n",countAC,countWA,countTLE,countRE);
}