import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int n = Integer.parseInt(in.next());
            int ac = 0;
            int wa = 0;
            int tle = 0;
            int re = 0;

            for (int i = 0; i < n; i++) {
                String tmp = in.next();
                if (tmp.equals("AC")) ac++;
                if (tmp.equals("WA")) wa++;
                if (tmp.equals("TLE")) tle++;
                if (tmp.equals("RE")) re++;
            }
            // 出力
            out.println("AC x " + ac);
            out.println("WA x " + wa);
            out.println("TLE x " + tle);
            out.println("RE x " + re);

        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int n = Integer.parseInt(in.next());
            int ac = 0;
            int wa = 0;
            int tle = 0;
            int re = 0;

            for (int i = 0; i < n; i++) {
                String tmp = in.next();
                if (tmp.equals("AC")) ac++;
                if (tmp.equals("WA")) wa++;
                if (tmp.equals("TLE")) tle++;
                if (tmp.equals("RE")) re++;
            }
            // 出力
            out.println("AC x " + ac);
            out.println("WA x " + wa);
            out.println("TLE x " + tle);
            out.println("RE x " + re);

        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) B solver = new B(); solver new B() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int n = Integer.parseInt(in.next());
            int ac = 0;
            int wa = 0;
            int tle = 0;
            int re = 0;

            for (int i = 0; i < n; i++) {
                String tmp = in.next();
                if (tmp.equals("AC")) ac++;
                if (tmp.equals("WA")) wa++;
                if (tmp.equals("TLE")) tle++;
                if (tmp.equals("RE")) re++;
            }
            // 出力
            out.println("AC x " + ac);
            out.println("WA x " + wa);
            out.println("TLE x " + tle);
            out.println("RE x " + re);

        }

    } B public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int n = Integer.parseInt(in.next());
            int ac = 0;
            int wa = 0;
            int tle = 0;
            int re = 0;

            for (int i = 0; i < n; i++) {
                String tmp = in.next();
                if (tmp.equals("AC")) ac++;
                if (tmp.equals("WA")) wa++;
                if (tmp.equals("TLE")) tle++;
                if (tmp.equals("RE")) re++;
            }
            // 出力
            out.println("AC x " + ac);
            out.println("WA x " + wa);
            out.println("TLE x " + tle);
            out.println("RE x " + re);

        } solve {
            // 入力
            int n = Integer.parseInt(in.next());
            int ac = 0;
            int wa = 0;
            int tle = 0;
            int re = 0;

            for (int i = 0; i < n; i++) {
                String tmp = in.next();
                if (tmp.equals("AC")) ac++;
                if (tmp.equals("WA")) wa++;
                if (tmp.equals("TLE")) tle++;
                if (tmp.equals("RE")) re++;
            }
            // 出力
            out.println("AC x " + ac);
            out.println("WA x " + wa);
            out.println("TLE x " + tle);
            out.println("RE x " + re);

        } int n = Integer.parseInt(in.next()); n Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int ac = 0; ac 0 int wa = 0; wa 0 int tle = 0; tle 0 int re = 0; re 0 for (int i = 0; i < n; i++) {
                String tmp = in.next();
                if (tmp.equals("AC")) ac++;
                if (tmp.equals("WA")) wa++;
                if (tmp.equals("TLE")) tle++;
                if (tmp.equals("RE")) re++;
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                String tmp = in.next();
                if (tmp.equals("AC")) ac++;
                if (tmp.equals("WA")) wa++;
                if (tmp.equals("TLE")) tle++;
                if (tmp.equals("RE")) re++;
            } {
                String tmp = in.next();
                if (tmp.equals("AC")) ac++;
                if (tmp.equals("WA")) wa++;
                if (tmp.equals("TLE")) tle++;
                if (tmp.equals("RE")) re++;
            } String tmp = in.next(); tmp in.next() in.next in if (tmp.equals("AC")) ac++; tmp.equals("AC") tmp.equals tmp "AC" ac++ ac if (tmp.equals("WA")) wa++; tmp.equals("WA") tmp.equals tmp "WA" wa++ wa if (tmp.equals("TLE")) tle++; tmp.equals("TLE") tmp.equals tmp "TLE" tle++ tle if (tmp.equals("RE")) re++; tmp.equals("RE") tmp.equals tmp "RE" re++ re out.println("AC x " + ac) out.println out "AC x " + ac "AC x " ac out.println("WA x " + wa) out.println out "WA x " + wa "WA x " wa out.println("TLE x " + tle) out.println out "TLE x " + tle "TLE x " tle out.println("RE x " + re) out.println out "RE x " + re "RE x " re int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int n = Integer.parseInt(in.next());
            int ac = 0;
            int wa = 0;
            int tle = 0;
            int re = 0;

            for (int i = 0; i < n; i++) {
                String tmp = in.next();
                if (tmp.equals("AC")) ac++;
                if (tmp.equals("WA")) wa++;
                if (tmp.equals("TLE")) tle++;
                if (tmp.equals("RE")) re++;
            }
            // 出力
            out.println("AC x " + ac);
            out.println("WA x " + wa);
            out.println("TLE x " + tle);
            out.println("RE x " + re);

        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int n = Integer.parseInt(in.next());
            int ac = 0;
            int wa = 0;
            int tle = 0;
            int re = 0;

            for (int i = 0; i < n; i++) {
                String tmp = in.next();
                if (tmp.equals("AC")) ac++;
                if (tmp.equals("WA")) wa++;
                if (tmp.equals("TLE")) tle++;
                if (tmp.equals("RE")) re++;
            }
            // 出力
            out.println("AC x " + ac);
            out.println("WA x " + wa);
            out.println("TLE x " + tle);
            out.println("RE x " + re);

        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int n = Integer.parseInt(in.next());
            int ac = 0;
            int wa = 0;
            int tle = 0;
            int re = 0;

            for (int i = 0; i < n; i++) {
                String tmp = in.next();
                if (tmp.equals("AC")) ac++;
                if (tmp.equals("WA")) wa++;
                if (tmp.equals("TLE")) tle++;
                if (tmp.equals("RE")) re++;
            }
            // 出力
            out.println("AC x " + ac);
            out.println("WA x " + wa);
            out.println("TLE x " + tle);
            out.println("RE x " + re);

        }

    }
}

