Problem:
Score : 200 points

Problem Statement

Takahashi is participating in a programming contest called AXC002, and he has just submitted his code to Problem A.

The problem has N test cases.

For each test case i (1\leq i \leq N), you are given a string S_i representing the verdict for that test case. Find the numbers of test cases for which the verdict is AC, WA, TLE, and RE, respectively.

See the Output section for the output format.

Constraints

1 \leq N \leq 10^5

S_i is AC, WA, TLE, or RE.

Input

Input is given from Standard Input in the following format:

N
S_1
\vdots
S_N

Output

Let C_0, C_1, C_2, and C_3 be the numbers of test cases for which the verdict is AC, WA, TLE, and RE, respectively. Print the following:

AC x C_0
WA x C_1
TLE x C_2
RE x C_3

Sample Input 1

6
AC
TLE
AC
AC
WA
TLE

Sample Output 1

AC x 3
WA x 1
TLE x 2
RE x 0

We have 3, 1, 2, and 0 test case(s) for which the verdict is AC, WA, TLE, and RE, respectively.

Sample Input 2

10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Sample Output 2

AC x 10
WA x 0
TLE x 0
RE x 0

Solution in C# (Mono-csc 3.5.0) (judge verdict: Accepted)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using static System.Console;
using static System.Math;
namespace AtCoder_1
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = CinT();
            Dictionary<string, int> dix = new Dictionary<string, int>();
            dix.Add("AC", 0);
            dix.Add("WA", 0);
            dix.Add("TLE", 0);
            dix.Add("RE", 0);
            for (int i = 0;i < n; i++)
            {
                var s = Cin();
                dix[s]++;
            }
            Cout("AC x " + dix["AC"]);
            Cout("WA x " + dix["WA"]);
            Cout("TLE x " + dix["TLE"]);
            Cout("RE x " + dix["RE"]);

            Cin();
        } //main


        static readonly int MOD10_9_7 = (1000000000 + 7);
        static Random Rand = new Random();
        static readonly string[] AlphabetTable = new string[] { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" };
        static int GetDigits(long num) { return (int)Floor(Log10(num)) + 1; }
        static int GetNumByDigit(long num, int digit)
        {
            return (int)((num / ((int)Pow(10, digit - 1))) % 10);
        }
        static int Loop(int num, int max)
        {
            if (num > max) { return num % max - 1; }
            else if (num < 0) { return max - (-num) % max + 1; }
            else { return num; }
        }
        static long PW10(int n) { return (long)Pow(10, n); }
        static long GCD(long a, long b)
        {
            if (a < b) { return GCD(b, a); }
            if (a % b == 0) { return b; }
            else { return GCD(b, a % b); }
        }
        static long LCM(long a, long b) { return a * b / GCD(a, b); }
        static void Swap<T>(ref T a, ref T b) { T t = a; a = b; b = t; }
        static void SwapArE<T>(T[] a, int i, int j) { T t = a[i]; a[i] = a[j]; a[j] = t; }
        static void SwapLiE<T>(List<T> a, int i, int j) { T t = a[i]; a[i] = a[j]; a[j] = t; }
        static bool IsInt(double d) { return (int)d == d; }
        static string Cin() { return ReadLine(); }
        static string[] CinAr() { var q = Cin().Split(' '); return (q[0] == "") ? new string[0] : q; }
        static int CinT() { return S2i(Cin()); }
        static int[] CinTAr() { return CinAr().Select((x, i) => { return S2i(x); }).ToArray(); }
        static long CinL() { return S2L(Cin()); }
        static long[] CinLAr() { return CinAr().Select((x, i) => { return S2L(x); }).ToArray(); }
        static double CinD() { return S2D(Cin()); }
        static double[] CinDAr() { return CinAr().Select((x, i) => { return S2D(x); }).ToArray(); }
        static int S2i(string s) { return int.Parse(s); }
        static long S2L(string s) { return long.Parse(s); }
        static double S2D(string s) { return double.Parse(s); }
        static void Cout(object s) { WriteLine(s); }
        static string RevStr(string s) { return new string(s.Reverse().ToArray()); }
        static long[] Divisor(long n)
        {
            if (n == 1) { return new long[] { 1 }; }
            List<long> res = new List<long>() { 1, n };
            for (long i = 2; i <= Math.Sqrt(n); i++)
            {
                if (n % i == 0)
                {
                    res.Add(i);
                    long f = n / i;
                    if (f != i) { res.Add(f); }
                }
            }
            return res.ToArray();
        }
        static IEnumerable<decimal> PrimeFactors(decimal n)
        {
            decimal i = 2, tmp = n;
            while (i * i <= n)
            {
                if (tmp % i == 0)
                {
                    tmp /= i;
                    yield return i;
                }
                else { i++; }
            }
            if (tmp != 1) { yield return tmp; }
        }
        static bool IsPrime(long num)
        {
            if (num == 1) { return false; }
            for (long i = 2; i <= Sqrt(num) + 1; i++) { if (num % i == 0) { return false; } }
            return true;
        }
        static void CoutAr<Type>(IEnumerable<Type> types) { Cout(string.Join(" ", types)); }
        static long nCr(int n, int r) { return nPr(n, r) / Factorial(r); }
        static long nPr(int n, int r) { return FactorialDivision(n, n - r); }
        static long FactorialDivision(int tf, int df)
        {
            long r = 1;
            for (int i = tf; i > df; i--) { r *= i; }
            return r;
        }
        static long Factorial(int i)
        {
            if (i <= 1) { return 1; }
            return i * Factorial(i - 1);
        }
        static void CoutMemPairAr<Type>(IEnumerable<Pair<Type>> pairs)
        {
            var ar = pairs.ToArray();
            for (int i = 0; i < ar.Length; i++) { Write($"({ar[i].a}, {ar[i].b}, {ar[i].c}), "); }
            Cout("");
        }
    }
    public struct Pair<T>
    {
        public T a, b, c;
        public Pair(T _a, T _b, T _c = default(T)) { a = _a; b = _b; c = _c; }
    }
}