using System;
using System.Linq;

class Test {
	static void Main(string[] args) {
      var inputs = System.Console.ReadLine()
    	.Split(' ')
    	.Select(s => int.Parse(s))
    	.ToArray();
      int N = inputs[0];
      int cntAC = 0;
      int cntWA = 0;
      int cntTLE = 0;
      int cntRE = 0;
      for(int i = 0; i < N; i++){
        string A = System.Console.ReadLine();
        if(A == "AC"){
          cntAC++;
        }else if(A == "WA"){
          cntWA++;
        }else if(A == "TLE"){
          cntTLE++;
        }else if(A == "RE"){
          cntWA++;
        }
      }
      Console.WriteLine("AC × " + cntAC);
      Console.WriteLine("WA × " + cntWA);
      Console.WriteLine("TLE × " + cntTLE);
      Console.WriteLine("RE × " + cntRE);
	}
}