using System;

public class Hello{
    public static void Main(){
        // Your code here!
        var N = int.Parse(Console.ReadLine());
        string[] array = new string[N];
        
        var AC = 0;
        var WA = 0;
        var TLE = 0;
        var RE = 0;
        
        for(var i=0; i < N; i++)
        {
            array[i] = Console.ReadLine();
            if(array[i] == "AC")
            {
                AC += 1;
            }
            else if(array[i] == "WA")
            {
                WA += 1;
            }
            else if(array[i] == "TLE")
            {
                TLE += 1;
            }
            else if(array[i] == "RE")
            {
                RE += 1;
            }
        }
        
        Console.WriteLine("AC × " + AC);
        Console.WriteLine("WA × " + WA);
        Console.WriteLine("TLE × " + TLE);
        Console.WriteLine("RE × " + RE);
    }
}