import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.lang.Math;
import java.util.Map;
import java.util.ArrayList;
import java.util.Collections;
import java.math.BigInteger;

public class Main {

    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        int t = fs.nextInt();
        String[] ar = new String[t];
        for (int TT=0;TT<t;TT++) {
            ar[TT] = fs.next();
        }
        HashMap<String,Integer> x = new HashMap<>();
        x.put("AC", 0);
        x.put("WA",0);
        x.put("TLE",0);
        x.put("RE",0);

        for (int i = 0; i<t; i++) {
            x.put(ar[i],x.get(ar[i])+1);
        }

        System.out.println("AC x " + x.get("AC"));
        System.out.println("WA x " + x.get("WA"));
        System.out.println("TLE x " + x.get("TLE"));
        System.out.println("RE x " + x.get("RE"));




    }





    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }
        long nextLong() {
            return Long.parseLong(next());
        }
    }

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.*; util.* java import java.lang.Math; Math java.lang import java.util.Map; Map java.util import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.math.BigInteger; BigInteger java.math public class Main {

    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        int t = fs.nextInt();
        String[] ar = new String[t];
        for (int TT=0;TT<t;TT++) {
            ar[TT] = fs.next();
        }
        HashMap<String,Integer> x = new HashMap<>();
        x.put("AC", 0);
        x.put("WA",0);
        x.put("TLE",0);
        x.put("RE",0);

        for (int i = 0; i<t; i++) {
            x.put(ar[i],x.get(ar[i])+1);
        }

        System.out.println("AC x " + x.get("AC"));
        System.out.println("WA x " + x.get("WA"));
        System.out.println("TLE x " + x.get("TLE"));
        System.out.println("RE x " + x.get("RE"));




    }





    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }
        long nextLong() {
            return Long.parseLong(next());
        }
    }

} Main public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        int t = fs.nextInt();
        String[] ar = new String[t];
        for (int TT=0;TT<t;TT++) {
            ar[TT] = fs.next();
        }
        HashMap<String,Integer> x = new HashMap<>();
        x.put("AC", 0);
        x.put("WA",0);
        x.put("TLE",0);
        x.put("RE",0);

        for (int i = 0; i<t; i++) {
            x.put(ar[i],x.get(ar[i])+1);
        }

        System.out.println("AC x " + x.get("AC"));
        System.out.println("WA x " + x.get("WA"));
        System.out.println("TLE x " + x.get("TLE"));
        System.out.println("RE x " + x.get("RE"));




    } main {
        FastScanner fs = new FastScanner();
        int t = fs.nextInt();
        String[] ar = new String[t];
        for (int TT=0;TT<t;TT++) {
            ar[TT] = fs.next();
        }
        HashMap<String,Integer> x = new HashMap<>();
        x.put("AC", 0);
        x.put("WA",0);
        x.put("TLE",0);
        x.put("RE",0);

        for (int i = 0; i<t; i++) {
            x.put(ar[i],x.get(ar[i])+1);
        }

        System.out.println("AC x " + x.get("AC"));
        System.out.println("WA x " + x.get("WA"));
        System.out.println("TLE x " + x.get("TLE"));
        System.out.println("RE x " + x.get("RE"));




    } FastScanner fs = new FastScanner(); fs new FastScanner() int t = fs.nextInt(); t fs.nextInt() fs.nextInt fs String[] ar = new String[t]; ar new String[t] t for (int TT=0;TT<t;TT++) {
            ar[TT] = fs.next();
        } int TT=0; int TT=0; TT 0 TT<t TT t TT++ TT++ TT {
            ar[TT] = fs.next();
        } {
            ar[TT] = fs.next();
        } ar[TT] = fs.next() ar[TT] ar TT fs.next() fs.next fs HashMap<String,Integer> x = new HashMap<>(); x new HashMap<>() x.put("AC", 0) x.put x "AC" 0 x.put("WA",0) x.put x "WA" 0 x.put("TLE",0) x.put x "TLE" 0 x.put("RE",0) x.put x "RE" 0 for (int i = 0; i<t; i++) {
            x.put(ar[i],x.get(ar[i])+1);
        } int i = 0; int i = 0; i 0 i<t i t i++ i++ i {
            x.put(ar[i],x.get(ar[i])+1);
        } {
            x.put(ar[i],x.get(ar[i])+1);
        } x.put(ar[i],x.get(ar[i])+1) x.put x ar[i] ar i x.get(ar[i])+1 x.get(ar[i]) x.get x ar[i] ar i 1 System.out.println("AC x " + x.get("AC")) System.out.println System.out System System.out "AC x " + x.get("AC") "AC x " x.get("AC") x.get x "AC" System.out.println("WA x " + x.get("WA")) System.out.println System.out System System.out "WA x " + x.get("WA") "WA x " x.get("WA") x.get x "WA" System.out.println("TLE x " + x.get("TLE")) System.out.println System.out System System.out "TLE x " + x.get("TLE") "TLE x " x.get("TLE") x.get x "TLE" System.out.println("RE x " + x.get("RE")) System.out.println System.out System System.out "RE x " + x.get("RE") "RE x " x.get("RE") x.get x "RE" String[] args args static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }
        long nextLong() {
            return Long.parseLong(next());
        }
    } FastScanner BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st=new StringTokenizer(""); st new StringTokenizer("") String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        } next {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        } while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                } !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                } catch (IOException e) {
                    e.printStackTrace();
                } IOException e {
                    e.printStackTrace();
                } e.printStackTrace() e.printStackTrace e {
                    st=new StringTokenizer(br.readLine());
                } st=new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        } readArray {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        } int[] a=new int[n]; a new int[n] n for (int i=0; i<n; i++) a[i]=nextInt(); int i=0; int i=0; i 0 i<n i n i++ i++ i a[i]=nextInt(); a[i]=nextInt() a[i] a i nextInt() nextInt return a; a int n n long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public class Main {

    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        int t = fs.nextInt();
        String[] ar = new String[t];
        for (int TT=0;TT<t;TT++) {
            ar[TT] = fs.next();
        }
        HashMap<String,Integer> x = new HashMap<>();
        x.put("AC", 0);
        x.put("WA",0);
        x.put("TLE",0);
        x.put("RE",0);

        for (int i = 0; i<t; i++) {
            x.put(ar[i],x.get(ar[i])+1);
        }

        System.out.println("AC x " + x.get("AC"));
        System.out.println("WA x " + x.get("WA"));
        System.out.println("TLE x " + x.get("TLE"));
        System.out.println("RE x " + x.get("RE"));




    }





    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }
        long nextLong() {
            return Long.parseLong(next());
        }
    }

} public class Main {

    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        int t = fs.nextInt();
        String[] ar = new String[t];
        for (int TT=0;TT<t;TT++) {
            ar[TT] = fs.next();
        }
        HashMap<String,Integer> x = new HashMap<>();
        x.put("AC", 0);
        x.put("WA",0);
        x.put("TLE",0);
        x.put("RE",0);

        for (int i = 0; i<t; i++) {
            x.put(ar[i],x.get(ar[i])+1);
        }

        System.out.println("AC x " + x.get("AC"));
        System.out.println("WA x " + x.get("WA"));
        System.out.println("TLE x " + x.get("TLE"));
        System.out.println("RE x " + x.get("RE"));




    }





    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }
        long nextLong() {
            return Long.parseLong(next());
        }
    }

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.lang.Math;
import java.util.Map;
import java.util.ArrayList;
import java.util.Collections;
import java.math.BigInteger;

public class Main {

    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        int t = fs.nextInt();
        String[] ar = new String[t];
        for (int TT=0;TT<t;TT++) {
            ar[TT] = fs.next();
        }
        HashMap<String,Integer> x = new HashMap<>();
        x.put("AC", 0);
        x.put("WA",0);
        x.put("TLE",0);
        x.put("RE",0);

        for (int i = 0; i<t; i++) {
            x.put(ar[i],x.get(ar[i])+1);
        }

        System.out.println("AC x " + x.get("AC"));
        System.out.println("WA x " + x.get("WA"));
        System.out.println("TLE x " + x.get("TLE"));
        System.out.println("RE x " + x.get("RE"));




    }





    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }
        long nextLong() {
            return Long.parseLong(next());
        }
    }

}
