using System;
using System.Threading;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Text;
using System.Linq;

class Project
{
    static void Main(string[] args)
    {
        int N = int.Parse(Console.ReadLine());
        int i;
        string[] S = new string[N];
        int countAC = 0;
        int countWA = 0;
        int countTLE = 0;
        int countRE = 0;
        for(i = 0; i < N; i++)
        {
            S[i] = Console.ReadLine();
        }
        for(i = 0; i < N; i++)
        {
            if(S[i] == "AC")
            {
                countAC++;
            }
            else if (S[i] == "WA")
            {
                countWA++;
            }
            else if (S[i] == "TLE")
            {
                countTLE++;
            }
            else if (S[i] == "RE")
            {
                countRE++;
            }
        }
        Console.WriteLine("{0} × {1}", "AC", countAC);
        Console.WriteLine("{0} × {1}", "WA", countWA);
        Console.WriteLine("{0} × {1}", "TLE", countTLE);
        Console.WriteLine("{0} × {1}", "RE", countRE);
    } 
}