import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.util.*;

/**
 * @author Tran Anh Tai
 * @template for CP codes
 * What a trick prob!
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(in, out);
        out.close();
    }
    // main solver
    static class Task{
        public void solve(InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int[] a =new int[4];
            for (int i = 0; i < n; i++){
                String r = in.nextToken();
                if (r.equals("AC")){
                    a[0]++;
                }
                else if(r.equals("WA")){
                    a[1]++;
                }
                else if (r.equals("TLE")){
                    a[2]++;
                }
                else{
                    a[3]++;
                }
            }
            out.println("AC x " + a[0]);
            out.println("WA x " + a[1]);
            out.println("TLE x " + a[2]);
            out.println("RE x " + a[3]);
        }
    }
    // fast input reader class;
    static class InputReader {
        BufferedReader br;
        StringTokenizer st;

        public InputReader(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream));
        }

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

        public int nextInt() {
            return Integer.parseInt(nextToken());
        }
        public long nextLong(){
            return Long.parseLong(nextToken());
        }
    }
} import java.io.*; io.* java import java.math.BigDecimal; BigDecimal java.math import java.math.BigInteger; BigInteger java.math import java.math.RoundingMode; RoundingMode java.math import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(in, out);
        out.close();
    }
    // main solver
    static class Task{
        public void solve(InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int[] a =new int[4];
            for (int i = 0; i < n; i++){
                String r = in.nextToken();
                if (r.equals("AC")){
                    a[0]++;
                }
                else if(r.equals("WA")){
                    a[1]++;
                }
                else if (r.equals("TLE")){
                    a[2]++;
                }
                else{
                    a[3]++;
                }
            }
            out.println("AC x " + a[0]);
            out.println("WA x " + a[1]);
            out.println("TLE x " + a[2]);
            out.println("RE x " + a[3]);
        }
    }
    // fast input reader class;
    static class InputReader {
        BufferedReader br;
        StringTokenizer st;

        public InputReader(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream));
        }

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

        public int nextInt() {
            return Integer.parseInt(nextToken());
        }
        public long nextLong(){
            return Long.parseLong(nextToken());
        }
    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out InputReader in = new InputReader(inputStream); in new InputReader(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) Task solver = new Task(); solver new Task() solver.solve(in, out) solver.solve solver in out out.close() out.close out String[] args args static class Task{
        public void solve(InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int[] a =new int[4];
            for (int i = 0; i < n; i++){
                String r = in.nextToken();
                if (r.equals("AC")){
                    a[0]++;
                }
                else if(r.equals("WA")){
                    a[1]++;
                }
                else if (r.equals("TLE")){
                    a[2]++;
                }
                else{
                    a[3]++;
                }
            }
            out.println("AC x " + a[0]);
            out.println("WA x " + a[1]);
            out.println("TLE x " + a[2]);
            out.println("RE x " + a[3]);
        }
    } Task public void solve(InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int[] a =new int[4];
            for (int i = 0; i < n; i++){
                String r = in.nextToken();
                if (r.equals("AC")){
                    a[0]++;
                }
                else if(r.equals("WA")){
                    a[1]++;
                }
                else if (r.equals("TLE")){
                    a[2]++;
                }
                else{
                    a[3]++;
                }
            }
            out.println("AC x " + a[0]);
            out.println("WA x " + a[1]);
            out.println("TLE x " + a[2]);
            out.println("RE x " + a[3]);
        } solve {
            int n = in.nextInt();
            int[] a =new int[4];
            for (int i = 0; i < n; i++){
                String r = in.nextToken();
                if (r.equals("AC")){
                    a[0]++;
                }
                else if(r.equals("WA")){
                    a[1]++;
                }
                else if (r.equals("TLE")){
                    a[2]++;
                }
                else{
                    a[3]++;
                }
            }
            out.println("AC x " + a[0]);
            out.println("WA x " + a[1]);
            out.println("TLE x " + a[2]);
            out.println("RE x " + a[3]);
        } int n = in.nextInt(); n in.nextInt() in.nextInt in int[] a =new int[4]; a new int[4] 4 for (int i = 0; i < n; i++){
                String r = in.nextToken();
                if (r.equals("AC")){
                    a[0]++;
                }
                else if(r.equals("WA")){
                    a[1]++;
                }
                else if (r.equals("TLE")){
                    a[2]++;
                }
                else{
                    a[3]++;
                }
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                String r = in.nextToken();
                if (r.equals("AC")){
                    a[0]++;
                }
                else if(r.equals("WA")){
                    a[1]++;
                }
                else if (r.equals("TLE")){
                    a[2]++;
                }
                else{
                    a[3]++;
                }
            } {
                String r = in.nextToken();
                if (r.equals("AC")){
                    a[0]++;
                }
                else if(r.equals("WA")){
                    a[1]++;
                }
                else if (r.equals("TLE")){
                    a[2]++;
                }
                else{
                    a[3]++;
                }
            } String r = in.nextToken(); r in.nextToken() in.nextToken in if (r.equals("AC")){
                    a[0]++;
                }
                else if(r.equals("WA")){
                    a[1]++;
                }
                else if (r.equals("TLE")){
                    a[2]++;
                }
                else{
                    a[3]++;
                } r.equals("AC") r.equals r "AC" {
                    a[0]++;
                } a[0]++ a[0] a 0 if(r.equals("WA")){
                    a[1]++;
                }
                else if (r.equals("TLE")){
                    a[2]++;
                }
                else{
                    a[3]++;
                } r.equals("WA") r.equals r "WA" {
                    a[1]++;
                } a[1]++ a[1] a 1 if (r.equals("TLE")){
                    a[2]++;
                }
                else{
                    a[3]++;
                } r.equals("TLE") r.equals r "TLE" {
                    a[2]++;
                } a[2]++ a[2] a 2 {
                    a[3]++;
                } a[3]++ a[3] a 3 out.println("AC x " + a[0]) out.println out "AC x " + a[0] "AC x " a[0] a 0 out.println("WA x " + a[1]) out.println out "WA x " + a[1] "WA x " a[1] a 1 out.println("TLE x " + a[2]) out.println out "TLE x " + a[2] "TLE x " a[2] a 2 out.println("RE x " + a[3]) out.println out "RE x " + a[3] "RE x " a[3] a 3 InputReader in in PrintWriter out out static class InputReader {
        BufferedReader br;
        StringTokenizer st;

        public InputReader(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream));
        }

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

        public int nextInt() {
            return Integer.parseInt(nextToken());
        }
        public long nextLong(){
            return Long.parseLong(nextToken());
        }
    } InputReader BufferedReader br; br StringTokenizer st; st public InputReader(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream));
        } InputReader {
            br = new BufferedReader(new InputStreamReader(stream));
        } br = new BufferedReader(new InputStreamReader(stream)) br new BufferedReader(new InputStreamReader(stream)) InputStream stream stream public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                String line = null;
                try {
                    line = br.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
                if (line == null) {
                    return null;
                }
                st = new StringTokenizer(line);
            }
            return st.nextToken();
        } nextToken {
            while (st == null || !st.hasMoreTokens()) {
                String line = null;
                try {
                    line = br.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
                if (line == null) {
                    return null;
                }
                st = new StringTokenizer(line);
            }
            return st.nextToken();
        } while (st == null || !st.hasMoreTokens()) {
                String line = null;
                try {
                    line = br.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
                if (line == null) {
                    return null;
                }
                st = new StringTokenizer(line);
            } st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st {
                String line = null;
                try {
                    line = br.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
                if (line == null) {
                    return null;
                }
                st = new StringTokenizer(line);
            } String line = null; line null try {
                    line = 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) {
                    line = br.readLine();
                } line = br.readLine() line br.readLine() br.readLine br if (line == null) {
                    return null;
                } line == null line null {
                    return null;
                } return null; null st = new StringTokenizer(line) st new StringTokenizer(line) return st.nextToken(); st.nextToken() st.nextToken st public int nextInt() {
            return Integer.parseInt(nextToken());
        } nextInt {
            return Integer.parseInt(nextToken());
        } return Integer.parseInt(nextToken()); Integer.parseInt(nextToken()) Integer.parseInt Integer nextToken() nextToken public long nextLong(){
            return Long.parseLong(nextToken());
        } nextLong {
            return Long.parseLong(nextToken());
        } return Long.parseLong(nextToken()); Long.parseLong(nextToken()) Long.parseLong Long nextToken() nextToken public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(in, out);
        out.close();
    }
    // main solver
    static class Task{
        public void solve(InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int[] a =new int[4];
            for (int i = 0; i < n; i++){
                String r = in.nextToken();
                if (r.equals("AC")){
                    a[0]++;
                }
                else if(r.equals("WA")){
                    a[1]++;
                }
                else if (r.equals("TLE")){
                    a[2]++;
                }
                else{
                    a[3]++;
                }
            }
            out.println("AC x " + a[0]);
            out.println("WA x " + a[1]);
            out.println("TLE x " + a[2]);
            out.println("RE x " + a[3]);
        }
    }
    // fast input reader class;
    static class InputReader {
        BufferedReader br;
        StringTokenizer st;

        public InputReader(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream));
        }

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

        public int nextInt() {
            return Integer.parseInt(nextToken());
        }
        public long nextLong(){
            return Long.parseLong(nextToken());
        }
    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(in, out);
        out.close();
    }
    // main solver
    static class Task{
        public void solve(InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int[] a =new int[4];
            for (int i = 0; i < n; i++){
                String r = in.nextToken();
                if (r.equals("AC")){
                    a[0]++;
                }
                else if(r.equals("WA")){
                    a[1]++;
                }
                else if (r.equals("TLE")){
                    a[2]++;
                }
                else{
                    a[3]++;
                }
            }
            out.println("AC x " + a[0]);
            out.println("WA x " + a[1]);
            out.println("TLE x " + a[2]);
            out.println("RE x " + a[3]);
        }
    }
    // fast input reader class;
    static class InputReader {
        BufferedReader br;
        StringTokenizer st;

        public InputReader(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream));
        }

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

        public int nextInt() {
            return Integer.parseInt(nextToken());
        }
        public long nextLong(){
            return Long.parseLong(nextToken());
        }
    }
} Main
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.util.*;

/**
 * @author Tran Anh Tai
 * @template for CP codes
 * What a trick prob!
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(in, out);
        out.close();
    }
    // main solver
    static class Task{
        public void solve(InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int[] a =new int[4];
            for (int i = 0; i < n; i++){
                String r = in.nextToken();
                if (r.equals("AC")){
                    a[0]++;
                }
                else if(r.equals("WA")){
                    a[1]++;
                }
                else if (r.equals("TLE")){
                    a[2]++;
                }
                else{
                    a[3]++;
                }
            }
            out.println("AC x " + a[0]);
            out.println("WA x " + a[1]);
            out.println("TLE x " + a[2]);
            out.println("RE x " + a[3]);
        }
    }
    // fast input reader class;
    static class InputReader {
        BufferedReader br;
        StringTokenizer st;

        public InputReader(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream));
        }

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

        public int nextInt() {
            return Integer.parseInt(nextToken());
        }
        public long nextLong(){
            return Long.parseLong(nextToken());
        }
    }
}