import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws InterruptedException {
        FastScanner fs=new FastScanner();
        int T=fs.nextInt();
        int ac = 0, wa = 0, tle = 0, re = 0;

        for (int tt=0; tt<T; tt++) {
            String a = fs.nextString();
            switch (a) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;
                    break;
            }
        }
        System.out.println("AC x " + ac);
        System.out.println("WA x " + wa);
        System.out.println("TLE x " + tle);
        System.out.println("RE x " + re);
    }

    void sort(int[] a) {
        ArrayList<Integer> list=new ArrayList<>();
        for (int i:a) list.add(i);
        Collections.sort(list);
        for (int i=0; i<a.length; i++) a[i]=list.get(i);
    }

    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");

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

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

        public int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }

        public String nextString() {
            return String.valueOf(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public long[] readLongArray(int n) {
            long[] a=new long[n];
            for (int i=0; i<n; i++) a[i]=nextLong();
            return a;
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.math.BigInteger; BigInteger java.math import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main {

    public static void main(String[] args) throws InterruptedException {
        FastScanner fs=new FastScanner();
        int T=fs.nextInt();
        int ac = 0, wa = 0, tle = 0, re = 0;

        for (int tt=0; tt<T; tt++) {
            String a = fs.nextString();
            switch (a) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;
                    break;
            }
        }
        System.out.println("AC x " + ac);
        System.out.println("WA x " + wa);
        System.out.println("TLE x " + tle);
        System.out.println("RE x " + re);
    }

    void sort(int[] a) {
        ArrayList<Integer> list=new ArrayList<>();
        for (int i:a) list.add(i);
        Collections.sort(list);
        for (int i=0; i<a.length; i++) a[i]=list.get(i);
    }

    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");

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

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

        public int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }

        public String nextString() {
            return String.valueOf(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public long[] readLongArray(int n) {
            long[] a=new long[n];
            for (int i=0; i<n; i++) a[i]=nextLong();
            return a;
        }
    }
} Main public static void main(String[] args) throws InterruptedException {
        FastScanner fs=new FastScanner();
        int T=fs.nextInt();
        int ac = 0, wa = 0, tle = 0, re = 0;

        for (int tt=0; tt<T; tt++) {
            String a = fs.nextString();
            switch (a) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;
                    break;
            }
        }
        System.out.println("AC x " + ac);
        System.out.println("WA x " + wa);
        System.out.println("TLE x " + tle);
        System.out.println("RE x " + re);
    } main {
        FastScanner fs=new FastScanner();
        int T=fs.nextInt();
        int ac = 0, wa = 0, tle = 0, re = 0;

        for (int tt=0; tt<T; tt++) {
            String a = fs.nextString();
            switch (a) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;
                    break;
            }
        }
        System.out.println("AC x " + ac);
        System.out.println("WA x " + wa);
        System.out.println("TLE x " + tle);
        System.out.println("RE x " + re);
    } FastScanner fs=new FastScanner(); fs new FastScanner() int T=fs.nextInt(); T fs.nextInt() fs.nextInt fs int ac = 0 ac 0 wa = 0 wa 0 tle = 0 tle 0 re = 0; re 0 for (int tt=0; tt<T; tt++) {
            String a = fs.nextString();
            switch (a) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;
                    break;
            }
        } int tt=0; int tt=0; tt 0 tt<T tt T tt++ tt++ tt {
            String a = fs.nextString();
            switch (a) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;
                    break;
            }
        } {
            String a = fs.nextString();
            switch (a) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;
                    break;
            }
        } String a = fs.nextString(); a fs.nextString() fs.nextString fs switch (a) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;
                    break;
            } a 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; System.out.println("AC x " + ac) System.out.println System.out System System.out "AC x " + ac "AC x " ac System.out.println("WA x " + wa) System.out.println System.out System System.out "WA x " + wa "WA x " wa System.out.println("TLE x " + tle) System.out.println System.out System System.out "TLE x " + tle "TLE x " tle System.out.println("RE x " + re) System.out.println System.out System System.out "RE x " + re "RE x " re String[] args args void sort(int[] a) {
        ArrayList<Integer> list=new ArrayList<>();
        for (int i:a) list.add(i);
        Collections.sort(list);
        for (int i=0; i<a.length; i++) a[i]=list.get(i);
    } sort {
        ArrayList<Integer> list=new ArrayList<>();
        for (int i:a) list.add(i);
        Collections.sort(list);
        for (int i=0; i<a.length; i++) a[i]=list.get(i);
    } ArrayList<Integer> list=new ArrayList<>(); list new ArrayList<>() for (int i:a) list.add(i); int i a list.add(i); list.add(i) list.add list i Collections.sort(list) Collections.sort Collections list for (int i=0; i<a.length; i++) a[i]=list.get(i); int i=0; int i=0; i 0 i<a.length i a.length a a.length i++ i++ i a[i]=list.get(i); a[i]=list.get(i) a[i] a i list.get(i) list.get list i int[] a a static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");

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

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

        public int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }

        public String nextString() {
            return String.valueOf(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public long[] readLongArray(int n) {
            long[] a=new long[n];
            for (int i=0; i<n; i++) a[i]=nextLong();
            return a;
        }
    } FastScanner BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st=new StringTokenizer(""); st new StringTokenizer("") public 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 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 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 public String nextString() {
            return String.valueOf(next());
        } nextString {
            return String.valueOf(next());
        } return String.valueOf(next()); String.valueOf(next()) String.valueOf String next() next public long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public long[] readLongArray(int n) {
            long[] a=new long[n];
            for (int i=0; i<n; i++) a[i]=nextLong();
            return a;
        } readLongArray {
            long[] a=new long[n];
            for (int i=0; i<n; i++) a[i]=nextLong();
            return a;
        } long[] a=new long[n]; a new long[n] n for (int i=0; i<n; i++) a[i]=nextLong(); int i=0; int i=0; i 0 i<n i n i++ i++ i a[i]=nextLong(); a[i]=nextLong() a[i] a i nextLong() nextLong return a; a int n n public class Main {

    public static void main(String[] args) throws InterruptedException {
        FastScanner fs=new FastScanner();
        int T=fs.nextInt();
        int ac = 0, wa = 0, tle = 0, re = 0;

        for (int tt=0; tt<T; tt++) {
            String a = fs.nextString();
            switch (a) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;
                    break;
            }
        }
        System.out.println("AC x " + ac);
        System.out.println("WA x " + wa);
        System.out.println("TLE x " + tle);
        System.out.println("RE x " + re);
    }

    void sort(int[] a) {
        ArrayList<Integer> list=new ArrayList<>();
        for (int i:a) list.add(i);
        Collections.sort(list);
        for (int i=0; i<a.length; i++) a[i]=list.get(i);
    }

    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");

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

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

        public int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }

        public String nextString() {
            return String.valueOf(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public long[] readLongArray(int n) {
            long[] a=new long[n];
            for (int i=0; i<n; i++) a[i]=nextLong();
            return a;
        }
    }
} public class Main {

    public static void main(String[] args) throws InterruptedException {
        FastScanner fs=new FastScanner();
        int T=fs.nextInt();
        int ac = 0, wa = 0, tle = 0, re = 0;

        for (int tt=0; tt<T; tt++) {
            String a = fs.nextString();
            switch (a) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;
                    break;
            }
        }
        System.out.println("AC x " + ac);
        System.out.println("WA x " + wa);
        System.out.println("TLE x " + tle);
        System.out.println("RE x " + re);
    }

    void sort(int[] a) {
        ArrayList<Integer> list=new ArrayList<>();
        for (int i:a) list.add(i);
        Collections.sort(list);
        for (int i=0; i<a.length; i++) a[i]=list.get(i);
    }

    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");

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

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

        public int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }

        public String nextString() {
            return String.valueOf(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public long[] readLongArray(int n) {
            long[] a=new long[n];
            for (int i=0; i<n; i++) a[i]=nextLong();
            return a;
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws InterruptedException {
        FastScanner fs=new FastScanner();
        int T=fs.nextInt();
        int ac = 0, wa = 0, tle = 0, re = 0;

        for (int tt=0; tt<T; tt++) {
            String a = fs.nextString();
            switch (a) {
                case "AC":
                    ac++;
                    break;
                case "WA":
                    wa++;
                    break;
                case "TLE":
                    tle++;
                    break;
                case "RE":
                    re++;
                    break;
            }
        }
        System.out.println("AC x " + ac);
        System.out.println("WA x " + wa);
        System.out.println("TLE x " + tle);
        System.out.println("RE x " + re);
    }

    void sort(int[] a) {
        ArrayList<Integer> list=new ArrayList<>();
        for (int i:a) list.add(i);
        Collections.sort(list);
        for (int i=0; i<a.length; i++) a[i]=list.get(i);
    }

    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");

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

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

        public int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }

        public String nextString() {
            return String.valueOf(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public long[] readLongArray(int n) {
            long[] a=new long[n];
            for (int i=0; i<n; i++) a[i]=nextLong();
            return a;
        }
    }
}