import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author HussienMoustafa
 */
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);
        BJudgeStatusSummary solver = new BJudgeStatusSummary();
        solver.solve(1, in, out);
        out.close();
    }

    static class BJudgeStatusSummary {
        public void solve(int testNumber, Scanner s, PrintWriter sout) {
            int n = s.nextInt(), ac = 0, wa = 0, tle = 0, re = 0;
            String x;
            char a;
            while (n-- != 0) {
                x = s.next();
                a = x.charAt(0);
                if (a == 'A') ac++;
                else if (a == 'T') tle++;
                else if (a == 'R') re++;
                else wa++;
            }
            sout.println("AC x " + ac);
            sout.println("WA x " + wa);
            sout.println("TLE x " + tle);
            sout.println("RE x " + re);
        }

    }

    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}
 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.StringTokenizer; StringTokenizer java.util import java.io.IOException; IOException java.io import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.InputStream; InputStream java.io 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);
        BJudgeStatusSummary solver = new BJudgeStatusSummary();
        solver.solve(1, in, out);
        out.close();
    }

    static class BJudgeStatusSummary {
        public void solve(int testNumber, Scanner s, PrintWriter sout) {
            int n = s.nextInt(), ac = 0, wa = 0, tle = 0, re = 0;
            String x;
            char a;
            while (n-- != 0) {
                x = s.next();
                a = x.charAt(0);
                if (a == 'A') ac++;
                else if (a == 'T') tle++;
                else if (a == 'R') re++;
                else wa++;
            }
            sout.println("AC x " + ac);
            sout.println("WA x " + wa);
            sout.println("TLE x " + tle);
            sout.println("RE x " + re);
        }

    }

    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
} 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);
        BJudgeStatusSummary solver = new BJudgeStatusSummary();
        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);
        BJudgeStatusSummary solver = new BJudgeStatusSummary();
        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) BJudgeStatusSummary solver = new BJudgeStatusSummary(); solver new BJudgeStatusSummary() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class BJudgeStatusSummary {
        public void solve(int testNumber, Scanner s, PrintWriter sout) {
            int n = s.nextInt(), ac = 0, wa = 0, tle = 0, re = 0;
            String x;
            char a;
            while (n-- != 0) {
                x = s.next();
                a = x.charAt(0);
                if (a == 'A') ac++;
                else if (a == 'T') tle++;
                else if (a == 'R') re++;
                else wa++;
            }
            sout.println("AC x " + ac);
            sout.println("WA x " + wa);
            sout.println("TLE x " + tle);
            sout.println("RE x " + re);
        }

    } BJudgeStatusSummary public void solve(int testNumber, Scanner s, PrintWriter sout) {
            int n = s.nextInt(), ac = 0, wa = 0, tle = 0, re = 0;
            String x;
            char a;
            while (n-- != 0) {
                x = s.next();
                a = x.charAt(0);
                if (a == 'A') ac++;
                else if (a == 'T') tle++;
                else if (a == 'R') re++;
                else wa++;
            }
            sout.println("AC x " + ac);
            sout.println("WA x " + wa);
            sout.println("TLE x " + tle);
            sout.println("RE x " + re);
        } solve {
            int n = s.nextInt(), ac = 0, wa = 0, tle = 0, re = 0;
            String x;
            char a;
            while (n-- != 0) {
                x = s.next();
                a = x.charAt(0);
                if (a == 'A') ac++;
                else if (a == 'T') tle++;
                else if (a == 'R') re++;
                else wa++;
            }
            sout.println("AC x " + ac);
            sout.println("WA x " + wa);
            sout.println("TLE x " + tle);
            sout.println("RE x " + re);
        } int n = s.nextInt() n s.nextInt() s.nextInt s ac = 0 ac 0 wa = 0 wa 0 tle = 0 tle 0 re = 0; re 0 String x; x char a; a while (n-- != 0) {
                x = s.next();
                a = x.charAt(0);
                if (a == 'A') ac++;
                else if (a == 'T') tle++;
                else if (a == 'R') re++;
                else wa++;
            } n-- != 0 n-- n 0 {
                x = s.next();
                a = x.charAt(0);
                if (a == 'A') ac++;
                else if (a == 'T') tle++;
                else if (a == 'R') re++;
                else wa++;
            } x = s.next() x s.next() s.next s a = x.charAt(0) a x.charAt(0) x.charAt x 0 if (a == 'A') ac++;
                else if (a == 'T') tle++;
                else if (a == 'R') re++;
                else wa++; a == 'A' a 'A' ac++ ac if (a == 'T') tle++;
                else if (a == 'R') re++;
                else wa++; a == 'T' a 'T' tle++ tle if (a == 'R') re++;
                else wa++; a == 'R' a 'R' re++ re wa++ wa sout.println("AC x " + ac) sout.println sout "AC x " + ac "AC x " ac sout.println("WA x " + wa) sout.println sout "WA x " + wa "WA x " wa sout.println("TLE x " + tle) sout.println sout "TLE x " + tle "TLE x " tle sout.println("RE x " + re) sout.println sout "RE x " + re "RE x " re int testNumber testNumber Scanner s s PrintWriter sout sout static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    } Scanner StringTokenizer st; st BufferedReader br; br public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        } Scanner {
            br = new BufferedReader(new InputStreamReader(s));
        } br = new BufferedReader(new InputStreamReader(s)) br new BufferedReader(new InputStreamReader(s)) InputStream s s public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        } next {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        } while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } IOException e {
                    throw new RuntimeException(e);
                } throw new RuntimeException(e); new RuntimeException(e) {
                    st = new StringTokenizer(br.readLine());
                } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next 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);
        BJudgeStatusSummary solver = new BJudgeStatusSummary();
        solver.solve(1, in, out);
        out.close();
    }

    static class BJudgeStatusSummary {
        public void solve(int testNumber, Scanner s, PrintWriter sout) {
            int n = s.nextInt(), ac = 0, wa = 0, tle = 0, re = 0;
            String x;
            char a;
            while (n-- != 0) {
                x = s.next();
                a = x.charAt(0);
                if (a == 'A') ac++;
                else if (a == 'T') tle++;
                else if (a == 'R') re++;
                else wa++;
            }
            sout.println("AC x " + ac);
            sout.println("WA x " + wa);
            sout.println("TLE x " + tle);
            sout.println("RE x " + re);
        }

    }

    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
} 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);
        BJudgeStatusSummary solver = new BJudgeStatusSummary();
        solver.solve(1, in, out);
        out.close();
    }

    static class BJudgeStatusSummary {
        public void solve(int testNumber, Scanner s, PrintWriter sout) {
            int n = s.nextInt(), ac = 0, wa = 0, tle = 0, re = 0;
            String x;
            char a;
            while (n-- != 0) {
                x = s.next();
                a = x.charAt(0);
                if (a == 'A') ac++;
                else if (a == 'T') tle++;
                else if (a == 'R') re++;
                else wa++;
            }
            sout.println("AC x " + ac);
            sout.println("WA x " + wa);
            sout.println("TLE x " + tle);
            sout.println("RE x " + re);
        }

    }

    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author HussienMoustafa
 */
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);
        BJudgeStatusSummary solver = new BJudgeStatusSummary();
        solver.solve(1, in, out);
        out.close();
    }

    static class BJudgeStatusSummary {
        public void solve(int testNumber, Scanner s, PrintWriter sout) {
            int n = s.nextInt(), ac = 0, wa = 0, tle = 0, re = 0;
            String x;
            char a;
            while (n-- != 0) {
                x = s.next();
                a = x.charAt(0);
                if (a == 'A') ac++;
                else if (a == 'T') tle++;
                else if (a == 'R') re++;
                else wa++;
            }
            sout.println("AC x " + ac);
            sout.println("WA x " + wa);
            sout.println("TLE x " + tle);
            sout.println("RE x " + re);
        }

    }

    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

