using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


    class Program
    {
        static void Main(string[] args)
        {
            int line = int.Parse(Console.ReadLine());
            
            int AC = 0;
            int WA = 0;
            int TLE = 0;
            int RE = 0;
            
            for(int i = 0; i < line; i++){
                string line2 = Console.ReadLine();
                if(line2 == "AC"){
                    AC++;
                }else if(line2 == "WA"){
                    WA++;
                }else if(line2 == "TLE"){
                    TLE++;
                }else if(line2 == "RE"){
                    RE++;
                }
            }
            
            Console.WriteLine("AC × " + AC);
            Console.WriteLine("WA × " + WA);
            Console.WriteLine("TLE × " + TLE);
            Console.WriteLine("RE × " + RE);
        }
    }