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

class Program
{
    static void Main(string[] args)
    {
        int[] ans = new int[4];
        int n = crI();
        for (int i =  0; i < n ; i++)
        {
            string s = crS();
            if (s.Equals("AC")) ans[0]++;
            else if (s.Equals("WA")) ans[1]++;
            else if (s.Equals("TLE")) ans[2]++;
            else if (s.Equals("RE")) ans[3]++;
        }
        Console.WriteLine("AC × " + ans[0]);
        Console.WriteLine("WA × " + ans[1]);
        Console.WriteLine("TLE × " + ans[2]);
        Console.WriteLine("RE × " + ans[3]);
    }

   
  



        //入力受け取り用
    static string crS() { return Console.ReadLine(); }
    static int crI() { return int.Parse(Console.ReadLine()); }
    static int[] arrInt(){return Console.ReadLine().Split(' ').Select(v => int.Parse(v)).ToArray();}
    static long[] arrLong(){ return Console.ReadLine().Split(' ').Select(v => long.Parse(v)).ToArray(); }
    static string[] arrStr(){return Console.ReadLine().Split(' ').ToArray();}
    static List<int[]> mapInt(int h)
    {
        List<int[]> mapInt = new List<int[]>();
        for (int i = 0; i < h; i++)
        {
            mapInt.Add(arrInt());
        }
        return mapInt;
    }
}