import java.io.*;

class Main {
    BufferedReader bf;
    PrintWriter writer;
    StringBuilder sb;
    static boolean local_system = false;

    void run() throws IOException {
        int t = getInt();
        int[] h = new int[4];
        while(t-->0) add(bf.readLine().trim(),h);
        writer.println(get(h));
    }

    void add(String s,int[] h){
        if(s.equals("AC")) h[0]++;
        else if(s.equals("WA")) h[1]++;
        else if(s.equals("TLE")) h[2]++;
        else if(s.equals("RE")) h[3]++;
    }
    String get(int[] h){
        StringBuilder sb = new StringBuilder();
        sb.append("AC x "+h[0]).append("\n");
        sb.append("WA x "+h[1]).append("\n");
        sb.append("TLE x "+h[2]).append("\n");
        sb.append("RE x "+h[3]).append("\n");
        return sb.toString().trim();
    }

    public static void main(String[] args) throws IOException {
        long start_time = System.currentTimeMillis();
        Main obj = new Main();
        obj.run();
        long end_time = System.currentTimeMillis();
        if (local_system) obj.writer.println("Time : " + (end_time - start_time));
        obj.close();
    }

    public Main(){
        writer = new PrintWriter(System.out);
        bf = new BufferedReader(new InputStreamReader(System.in));
        sb = new StringBuilder();
    }

    public int getInt() throws IOException {
        return Integer.parseInt(bf.readLine());
    }

    public long getLong() throws IOException {
        return Long.parseLong(bf.readLine());
    }

    public int[] ints() throws IOException {
        String[] data = bf.readLine().split(" ");
        int[] send = new int[data.length];
        for (int i = 0, h = data.length; i < h; i++) send[i] = Integer.parseInt(data[i]);
        return send;
    }

    public long[] longs() throws IOException {
        String[] data = bf.readLine().split(" ");
        long[] send = new long[data.length];
        for (int i = 0, h = data.length; i < h; i++) send[i] = Long.parseLong(data[i]);
        return send;
    }

    public void close() throws IOException{
        writer.flush();
        writer.close();
        bf.close();
    }
}

 import java.io.*; io.* java class Main {
    BufferedReader bf;
    PrintWriter writer;
    StringBuilder sb;
    static boolean local_system = false;

    void run() throws IOException {
        int t = getInt();
        int[] h = new int[4];
        while(t-->0) add(bf.readLine().trim(),h);
        writer.println(get(h));
    }

    void add(String s,int[] h){
        if(s.equals("AC")) h[0]++;
        else if(s.equals("WA")) h[1]++;
        else if(s.equals("TLE")) h[2]++;
        else if(s.equals("RE")) h[3]++;
    }
    String get(int[] h){
        StringBuilder sb = new StringBuilder();
        sb.append("AC x "+h[0]).append("\n");
        sb.append("WA x "+h[1]).append("\n");
        sb.append("TLE x "+h[2]).append("\n");
        sb.append("RE x "+h[3]).append("\n");
        return sb.toString().trim();
    }

    public static void main(String[] args) throws IOException {
        long start_time = System.currentTimeMillis();
        Main obj = new Main();
        obj.run();
        long end_time = System.currentTimeMillis();
        if (local_system) obj.writer.println("Time : " + (end_time - start_time));
        obj.close();
    }

    public Main(){
        writer = new PrintWriter(System.out);
        bf = new BufferedReader(new InputStreamReader(System.in));
        sb = new StringBuilder();
    }

    public int getInt() throws IOException {
        return Integer.parseInt(bf.readLine());
    }

    public long getLong() throws IOException {
        return Long.parseLong(bf.readLine());
    }

    public int[] ints() throws IOException {
        String[] data = bf.readLine().split(" ");
        int[] send = new int[data.length];
        for (int i = 0, h = data.length; i < h; i++) send[i] = Integer.parseInt(data[i]);
        return send;
    }

    public long[] longs() throws IOException {
        String[] data = bf.readLine().split(" ");
        long[] send = new long[data.length];
        for (int i = 0, h = data.length; i < h; i++) send[i] = Long.parseLong(data[i]);
        return send;
    }

    public void close() throws IOException{
        writer.flush();
        writer.close();
        bf.close();
    }
} Main BufferedReader bf; bf PrintWriter writer; writer StringBuilder sb; sb static boolean local_system = false; local_system false void run() throws IOException {
        int t = getInt();
        int[] h = new int[4];
        while(t-->0) add(bf.readLine().trim(),h);
        writer.println(get(h));
    } run {
        int t = getInt();
        int[] h = new int[4];
        while(t-->0) add(bf.readLine().trim(),h);
        writer.println(get(h));
    } int t = getInt(); t getInt() getInt int[] h = new int[4]; h new int[4] 4 while(t-->0) add(bf.readLine().trim(),h); t-->0 t-- t 0 add(bf.readLine().trim(),h) add bf.readLine().trim() bf.readLine().trim bf.readLine() bf.readLine bf h writer.println(get(h)) writer.println writer get(h) get h void add(String s,int[] h){
        if(s.equals("AC")) h[0]++;
        else if(s.equals("WA")) h[1]++;
        else if(s.equals("TLE")) h[2]++;
        else if(s.equals("RE")) h[3]++;
    } add {
        if(s.equals("AC")) h[0]++;
        else if(s.equals("WA")) h[1]++;
        else if(s.equals("TLE")) h[2]++;
        else if(s.equals("RE")) h[3]++;
    } if(s.equals("AC")) h[0]++;
        else if(s.equals("WA")) h[1]++;
        else if(s.equals("TLE")) h[2]++;
        else if(s.equals("RE")) h[3]++; s.equals("AC") s.equals s "AC" h[0]++ h[0] h 0 if(s.equals("WA")) h[1]++;
        else if(s.equals("TLE")) h[2]++;
        else if(s.equals("RE")) h[3]++; s.equals("WA") s.equals s "WA" h[1]++ h[1] h 1 if(s.equals("TLE")) h[2]++;
        else if(s.equals("RE")) h[3]++; s.equals("TLE") s.equals s "TLE" h[2]++ h[2] h 2 if(s.equals("RE")) h[3]++; s.equals("RE") s.equals s "RE" h[3]++ h[3] h 3 String s s int[] h h String get(int[] h){
        StringBuilder sb = new StringBuilder();
        sb.append("AC x "+h[0]).append("\n");
        sb.append("WA x "+h[1]).append("\n");
        sb.append("TLE x "+h[2]).append("\n");
        sb.append("RE x "+h[3]).append("\n");
        return sb.toString().trim();
    } get {
        StringBuilder sb = new StringBuilder();
        sb.append("AC x "+h[0]).append("\n");
        sb.append("WA x "+h[1]).append("\n");
        sb.append("TLE x "+h[2]).append("\n");
        sb.append("RE x "+h[3]).append("\n");
        return sb.toString().trim();
    } StringBuilder sb = new StringBuilder(); sb new StringBuilder() sb.append("AC x "+h[0]).append("\n") sb.append("AC x "+h[0]).append sb.append("AC x "+h[0]) sb.append sb "AC x "+h[0] "AC x " h[0] h 0 "\n" sb.append("WA x "+h[1]).append("\n") sb.append("WA x "+h[1]).append sb.append("WA x "+h[1]) sb.append sb "WA x "+h[1] "WA x " h[1] h 1 "\n" sb.append("TLE x "+h[2]).append("\n") sb.append("TLE x "+h[2]).append sb.append("TLE x "+h[2]) sb.append sb "TLE x "+h[2] "TLE x " h[2] h 2 "\n" sb.append("RE x "+h[3]).append("\n") sb.append("RE x "+h[3]).append sb.append("RE x "+h[3]) sb.append sb "RE x "+h[3] "RE x " h[3] h 3 "\n" return sb.toString().trim(); sb.toString().trim() sb.toString().trim sb.toString() sb.toString sb int[] h h public static void main(String[] args) throws IOException {
        long start_time = System.currentTimeMillis();
        Main obj = new Main();
        obj.run();
        long end_time = System.currentTimeMillis();
        if (local_system) obj.writer.println("Time : " + (end_time - start_time));
        obj.close();
    } main {
        long start_time = System.currentTimeMillis();
        Main obj = new Main();
        obj.run();
        long end_time = System.currentTimeMillis();
        if (local_system) obj.writer.println("Time : " + (end_time - start_time));
        obj.close();
    } long start_time = System.currentTimeMillis(); start_time System.currentTimeMillis() System.currentTimeMillis System Main obj = new Main(); obj new Main() obj.run() obj.run obj long end_time = System.currentTimeMillis(); end_time System.currentTimeMillis() System.currentTimeMillis System if (local_system) obj.writer.println("Time : " + (end_time - start_time)); local_system obj.writer.println("Time : " + (end_time - start_time)) obj.writer.println obj.writer obj obj.writer "Time : " + (end_time - start_time) "Time : " (end_time - start_time) end_time start_time obj.close() obj.close obj String[] args args public Main(){
        writer = new PrintWriter(System.out);
        bf = new BufferedReader(new InputStreamReader(System.in));
        sb = new StringBuilder();
    } Main {
        writer = new PrintWriter(System.out);
        bf = new BufferedReader(new InputStreamReader(System.in));
        sb = new StringBuilder();
    } writer = new PrintWriter(System.out) writer new PrintWriter(System.out) bf = new BufferedReader(new InputStreamReader(System.in)) bf new BufferedReader(new InputStreamReader(System.in)) sb = new StringBuilder() sb new StringBuilder() public int getInt() throws IOException {
        return Integer.parseInt(bf.readLine());
    } getInt {
        return Integer.parseInt(bf.readLine());
    } return Integer.parseInt(bf.readLine()); Integer.parseInt(bf.readLine()) Integer.parseInt Integer bf.readLine() bf.readLine bf public long getLong() throws IOException {
        return Long.parseLong(bf.readLine());
    } getLong {
        return Long.parseLong(bf.readLine());
    } return Long.parseLong(bf.readLine()); Long.parseLong(bf.readLine()) Long.parseLong Long bf.readLine() bf.readLine bf public int[] ints() throws IOException {
        String[] data = bf.readLine().split(" ");
        int[] send = new int[data.length];
        for (int i = 0, h = data.length; i < h; i++) send[i] = Integer.parseInt(data[i]);
        return send;
    } ints {
        String[] data = bf.readLine().split(" ");
        int[] send = new int[data.length];
        for (int i = 0, h = data.length; i < h; i++) send[i] = Integer.parseInt(data[i]);
        return send;
    } String[] data = bf.readLine().split(" "); data bf.readLine().split(" ") bf.readLine().split bf.readLine() bf.readLine bf " " int[] send = new int[data.length]; send new int[data.length] data.length data data.length for (int i = 0, h = data.length; i < h; i++) send[i] = Integer.parseInt(data[i]); int i = 0, h = data.length; int i = 0 i 0 h = data.length; h data.length data data.length i < h i h i++ i++ i send[i] = Integer.parseInt(data[i]); send[i] = Integer.parseInt(data[i]) send[i] send i Integer.parseInt(data[i]) Integer.parseInt Integer data[i] data i return send; send public long[] longs() throws IOException {
        String[] data = bf.readLine().split(" ");
        long[] send = new long[data.length];
        for (int i = 0, h = data.length; i < h; i++) send[i] = Long.parseLong(data[i]);
        return send;
    } longs {
        String[] data = bf.readLine().split(" ");
        long[] send = new long[data.length];
        for (int i = 0, h = data.length; i < h; i++) send[i] = Long.parseLong(data[i]);
        return send;
    } String[] data = bf.readLine().split(" "); data bf.readLine().split(" ") bf.readLine().split bf.readLine() bf.readLine bf " " long[] send = new long[data.length]; send new long[data.length] data.length data data.length for (int i = 0, h = data.length; i < h; i++) send[i] = Long.parseLong(data[i]); int i = 0, h = data.length; int i = 0 i 0 h = data.length; h data.length data data.length i < h i h i++ i++ i send[i] = Long.parseLong(data[i]); send[i] = Long.parseLong(data[i]) send[i] send i Long.parseLong(data[i]) Long.parseLong Long data[i] data i return send; send public void close() throws IOException{
        writer.flush();
        writer.close();
        bf.close();
    } close {
        writer.flush();
        writer.close();
        bf.close();
    } writer.flush() writer.flush writer writer.close() writer.close writer bf.close() bf.close bf
import java.io.*;

class Main {
    BufferedReader bf;
    PrintWriter writer;
    StringBuilder sb;
    static boolean local_system = false;

    void run() throws IOException {
        int t = getInt();
        int[] h = new int[4];
        while(t-->0) add(bf.readLine().trim(),h);
        writer.println(get(h));
    }

    void add(String s,int[] h){
        if(s.equals("AC")) h[0]++;
        else if(s.equals("WA")) h[1]++;
        else if(s.equals("TLE")) h[2]++;
        else if(s.equals("RE")) h[3]++;
    }
    String get(int[] h){
        StringBuilder sb = new StringBuilder();
        sb.append("AC x "+h[0]).append("\n");
        sb.append("WA x "+h[1]).append("\n");
        sb.append("TLE x "+h[2]).append("\n");
        sb.append("RE x "+h[3]).append("\n");
        return sb.toString().trim();
    }

    public static void main(String[] args) throws IOException {
        long start_time = System.currentTimeMillis();
        Main obj = new Main();
        obj.run();
        long end_time = System.currentTimeMillis();
        if (local_system) obj.writer.println("Time : " + (end_time - start_time));
        obj.close();
    }

    public Main(){
        writer = new PrintWriter(System.out);
        bf = new BufferedReader(new InputStreamReader(System.in));
        sb = new StringBuilder();
    }

    public int getInt() throws IOException {
        return Integer.parseInt(bf.readLine());
    }

    public long getLong() throws IOException {
        return Long.parseLong(bf.readLine());
    }

    public int[] ints() throws IOException {
        String[] data = bf.readLine().split(" ");
        int[] send = new int[data.length];
        for (int i = 0, h = data.length; i < h; i++) send[i] = Integer.parseInt(data[i]);
        return send;
    }

    public long[] longs() throws IOException {
        String[] data = bf.readLine().split(" ");
        long[] send = new long[data.length];
        for (int i = 0, h = data.length; i < h; i++) send[i] = Long.parseLong(data[i]);
        return send;
    }

    public void close() throws IOException{
        writer.flush();
        writer.close();
        bf.close();
    }
}


