using System;
using System.Linq;


class name
{
    static void Main()
    {

        int[] n = Console.ReadLine().Split().Select(int.Parse).ToArray();
        string m=string.Empty ;
        int[] h = new int[10];
        string AC = "AC";
        string WA = "WA";
        string TLE = "TLE";
        string RE = "RE";
        for(int k = 0; k < n[0]; k++)
        {
            m = Console.ReadLine();
            if (m.Equals(AC))
            {
                h[0] += 1;

            }
            else if (m.Equals(WA))
            {

                h[1] += 1;
            }
            else if (m.Equals(TLE))
            {
                h[2] += 1;

            }
            else if(m.Equals(RE)) 
            {
                h[3] += 1;

            }

        }
        Console.WriteLine("AC × " + h[0] + "");
        Console.WriteLine("WA × " + h[1] + "");
        Console.WriteLine("TLE × " + h[2] + "");
        Console.WriteLine("RE × " + h[3] + "");

    }



}

