function Main(input) {
   var tmp = input.split("\n");
   var num = parseInt(tmp[0]);
   var ary = [];
   var pst = 0;
   var numAC = 0;
   var numWA = 0;
   var numTLE = 0;
   var numRE = 0;
   
   
   for(pst=1; pst<=num; pst++){
       ary.push(tmp[pst]);
   }
   for(pst=0; pst<ary.length; pst++){
       if(ary[pst]==="AC"){
           numAC+=1;
       }else if(ary[pst]==="WA"){
           numWA+=1;
       }else if(ary[pst]==="TLE"){
           numTLE+=1;
       }else if(ary[pst]==="RE"){
           numRE+=1;
       }
   }
   
   console.log("AC　×　"+numAC);
   console.log("WA　×　"+numWA);
   console.log("TLE　×　"+numTLE);
   console.log("RE　×　"+numRE);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));