using System;
using System.Collections.Generic;
using System.Linq;

namespace AtCoder.Abc
{
    class QuestionB
    {
        public static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            int AC = 0, WA = 0, TLE = 0, RE = 0;
            for (int i = 0; i < N; i++) {
                string S = Console.ReadLine();
                if (S == "AC") {
                    AC++;
                }
                if (S == "WA") {
                    WA++;
                }
                if (S == "TLE") {
                    TLE++;
                }
                if (S == "RE") {
                    RE++;
                }
            }
            Console.WriteLine("AC × " + AC);
            Console.WriteLine("WA × " + WA);
            Console.WriteLine("TLE × " + TLE);
            Console.WriteLine("RE × " + RE);
        }
    }
}
