import java.io.*;
import java.util.*;

public class Main{
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static final PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    private static StringTokenizer st;

    private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    }

    private static String readToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public static void main(String[] args) throws IOException {
        int N = readInt();
        int ac = 0;
        int wa = 0;
        int tle = 0;
        int re = 0;
        for (int i = 0; i < N; i++) {
            String verdict = readToken();

            switch (verdict) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;break;
                default:
                    // Impossible
            }
        }

        pw.println("AC x " + ac
                + "\nWA x " + wa
                + "\nTLE x " + tle
                + "\nRE x " + re);
        pw.close();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main{
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static final PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    private static StringTokenizer st;

    private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    }

    private static String readToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public static void main(String[] args) throws IOException {
        int N = readInt();
        int ac = 0;
        int wa = 0;
        int tle = 0;
        int re = 0;
        for (int i = 0; i < N; i++) {
            String verdict = readToken();

            switch (verdict) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;break;
                default:
                    // Impossible
            }
        }

        pw.println("AC x " + ac
                + "\nWA x " + wa
                + "\nTLE x " + tle
                + "\nRE x " + re);
        pw.close();
    }
} Main private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) private static final PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))); pw new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))) private static StringTokenizer st; st private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    } readInt {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    } while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine()); st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return Integer.parseInt(st.nextToken()); Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st private static String readToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    } readToken {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    } while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine()); st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public static void main(String[] args) throws IOException {
        int N = readInt();
        int ac = 0;
        int wa = 0;
        int tle = 0;
        int re = 0;
        for (int i = 0; i < N; i++) {
            String verdict = readToken();

            switch (verdict) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;break;
                default:
                    // Impossible
            }
        }

        pw.println("AC x " + ac
                + "\nWA x " + wa
                + "\nTLE x " + tle
                + "\nRE x " + re);
        pw.close();
    } main {
        int N = readInt();
        int ac = 0;
        int wa = 0;
        int tle = 0;
        int re = 0;
        for (int i = 0; i < N; i++) {
            String verdict = readToken();

            switch (verdict) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;break;
                default:
                    // Impossible
            }
        }

        pw.println("AC x " + ac
                + "\nWA x " + wa
                + "\nTLE x " + tle
                + "\nRE x " + re);
        pw.close();
    } int N = readInt(); N readInt() readInt 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 verdict = readToken();

            switch (verdict) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;break;
                default:
                    // Impossible
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            String verdict = readToken();

            switch (verdict) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;break;
                default:
                    // Impossible
            }
        } {
            String verdict = readToken();

            switch (verdict) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;break;
                default:
                    // Impossible
            }
        } String verdict = readToken(); verdict readToken() readToken switch (verdict) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;break;
                default:
                    // Impossible
            } verdict case "AC": "AC" case "AC": ac++ ac break; case "WA": "WA" case "WA": wa++ wa break; case "TLE": "TLE" case "TLE": tle++ tle break; case "RE": "RE" case "RE": re++ re break; default: default: pw.println("AC x " + ac
                + "\nWA x " + wa
                + "\nTLE x " + tle
                + "\nRE x " + re) pw.println pw "AC x " + ac
                + "\nWA x " + wa
                + "\nTLE x " + tle
                + "\nRE x " + re "\nRE x " tle "\nTLE x " wa "\nWA x " "AC x " + ac
                + "\nWA x " + wa
                + "\nTLE x " + tle
                + "\nRE x " + re "AC x " ac "\nWA x " wa "\nTLE x " tle "\nRE x " re pw.close() pw.close pw String[] args args public class Main{
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static final PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    private static StringTokenizer st;

    private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    }

    private static String readToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public static void main(String[] args) throws IOException {
        int N = readInt();
        int ac = 0;
        int wa = 0;
        int tle = 0;
        int re = 0;
        for (int i = 0; i < N; i++) {
            String verdict = readToken();

            switch (verdict) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;break;
                default:
                    // Impossible
            }
        }

        pw.println("AC x " + ac
                + "\nWA x " + wa
                + "\nTLE x " + tle
                + "\nRE x " + re);
        pw.close();
    }
} public class Main{
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static final PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    private static StringTokenizer st;

    private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    }

    private static String readToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public static void main(String[] args) throws IOException {
        int N = readInt();
        int ac = 0;
        int wa = 0;
        int tle = 0;
        int re = 0;
        for (int i = 0; i < N; i++) {
            String verdict = readToken();

            switch (verdict) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;break;
                default:
                    // Impossible
            }
        }

        pw.println("AC x " + ac
                + "\nWA x " + wa
                + "\nTLE x " + tle
                + "\nRE x " + re);
        pw.close();
    }
} Main
import java.io.*;
import java.util.*;

public class Main{
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static final PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    private static StringTokenizer st;

    private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    }

    private static String readToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public static void main(String[] args) throws IOException {
        int N = readInt();
        int ac = 0;
        int wa = 0;
        int tle = 0;
        int re = 0;
        for (int i = 0; i < N; i++) {
            String verdict = readToken();

            switch (verdict) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;break;
                default:
                    // Impossible
            }
        }

        pw.println("AC x " + ac
                + "\nWA x " + wa
                + "\nTLE x " + tle
                + "\nRE x " + re);
        pw.close();
    }
}
