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

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            var N = GetLongNum();
            var list = new List<string>();
            for (int i = 0; i < N; i++)
            {
                list.Add(GetString());
            }

            var AC = list.Count(x => x == "AC");
            var WA = list.Count(x => x == "WA");
            var TLE = list.Count(x => x == "TLE");
            var RE = list.Count(x => x == "RE");

            Console.WriteLine("AC × " + AC);
            Console.WriteLine("WA × " + WA);
            Console.WriteLine("TLE × "+ +TLE);
            Console.WriteLine("RE × " + RE);
        }

        private static long[] GetLongNumArray()
        {
            var input = Console.ReadLine().Split(' ');
            return input.Select(x => long.Parse(x)).ToArray();
        }

        private static long GetLongNum()
        {
            return long.Parse(Console.ReadLine());
        }

        private static string[] GetStringArray()
        {
            return Console.ReadLine().Split(' ');
        }

        private static string GetString()
        {
            return Console.ReadLine();
        }
    }
}
