import java.io.*;
import java.util.*;
import java.lang.*;

public class Main {
    public static MyScanner scan;
    public static PrintWriter out;
    public static void main(String[] args) {
        scan=new MyScanner();
        out=new PrintWriter(new BufferedOutputStream(System.out));

        int t=1;
//        int t=scan.nextInt();
        while(t-->0) {

            int n=scan.nextInt();
            int ac=0,tle=0,wa=0,re=0;
            while(n-->0) {
                String s=scan.nextLine();
                if(s.equals("AC")) ac++;
                else if(s.equals("TLE")) tle++;
                else if(s.equals("WA")) wa++;
                else re++;
            }
            out.println("AC x "+ac);
            out.println("WA x "+wa);
            out.println("TLE x "+tle);
            out.println("RE x "+re);
        }
        out.close();
    }

    //-----------------------------------------------------COMP-SPACE-----------------------------------------------------



    //--------------------------------------------------------------------------------------------------------------------

    //node
    static class Node implements Comparable<Node> {
        public int x,y;
        public Node(int x,int y) {
            this.x=x;
            this.y=y;
        }

        public int compareTo(Node other) {
            if(this.x==other.x) return 0;
            else if(this.x>other.x) return 1;
            else return -1;
        }

        public boolean equals(Node other) {
            return this.x==other.x;
        }

//        public int compareTo(Node other) {
//            if(this.y==other.y) return 0;
//            else if(this.y>other.y) return 1;
//            else return -1;
//        }
//
//        public boolean equals(Node other) {
//            return this.y==other.y;
//        }
    }
    //edge
    static class Edge implements Comparable<Edge> {
        public Node a,b;
        public int weight;

        public Edge(Node a,Node b,int weight) {
            this.a=a;
            this.b=b;
            this.weight=weight;
        }

        public int compareTo(Edge other) {
            if(this.weight==other.weight) return 0;
            else if(this.weight>other.weight) return 1;
            else return -1;
        }
    }

    //util
    public static int gcd(int a, int b) {
        if (b == 0)
            return a;
        if (a == 0)
            return b;
        return (a > b) ? gcd(a % b, b) : gcd(a, b % a);
    }

    public static int lcm(int a, int b) {
        return a * b / gcd(a, b);
    }

    public static int min(int a,int b) {
        if(a<=b) return a;
        else return b;
    }

    public static int max(int a,int b) {
        if(a>=b) return a;
        else return b;
    }

    public static int abs(int a) {
        if(a<0) return a*-1;
        else return a;
    }

    public static ArrayList<Integer> getPrimes(int n) {
        boolean prime[]=new boolean[n+1];
        Arrays.fill(prime,true);
        for (int p=2;p*p<=n;p++) {
            if (prime[p]) {
                for (int i=p*2;i<=n;i+=p) {
                    prime[i]=false;
                }
            }
        }
        ArrayList<Integer> primeNumbers=new ArrayList<Integer>();
        for (int i = 2; i <= n; i++) {
            if (prime[i]) {
                primeNumbers.add(i);
            }
        }
        return primeNumbers;
    }

    public static boolean isPrime(int a) {
        if (a == 0 || a == 1) {
            return false;
        }
        if (a == 2) {
            return true;
        }
        for (int i = 2; i < Math.sqrt(a) + 1; i++) {
            if (a % i == 0) {
                return false;
            }
        }
        return true;
    }

    public static ArrayList<Integer> getDivisors(int n) {
        ArrayList<Integer> div = new ArrayList<Integer>();
        for (int i=1;i*i<=n;i++) {
            if (n%i==0) {
                div.add(i);
                if (n/i!=i)
                    div.add(n/i);
            }
        }
        return div;
    }

    //scanner
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

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

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

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

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static int[] nextIntArray(int n) {
        int[] a=new int[n];
        for(int c=0;c<n;c++) a[c]=scan.nextInt();
        return a;
    }

    public static Integer[] nextIntegerArray(int n) {
        Integer[] a=new Integer[n];
        for(int c=0;c<n;c++) a[c]=scan.nextInt();
        return a;
    }

    public static int[][] nextIntMatrix(int n,int m) {
        int[][] a=new int[n][m];
        for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=scan.nextInt();
        return a;
    }

    public static Integer[][] nextIntegerMatrix(int n,int m) {
        Integer[][] a=new Integer[n][m];
        for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=scan.nextInt();
        return a;
    }

    //print
    public static void printIntArray(int[] a) {
        for(int c:a) out.print(c+" ");
        out.println();
    }

    public static void printIntegerArray(Integer[] a) {
        for(int c:a) out.print(c+" ");
        out.println();
    }

    public static void printIntMatrix(int[][] a) {
        for(int[] i:a) {
            for(int j:i) out.print(j+" ");
            out.println();
        }
    }

    public static void printIntegerMatrix(Integer[][] a) {
        for(Integer[] i:a) {
            for(Integer j:i) out.print(j+" ");
            out.println();
        }
    }

    public static void help(int t,int n) { out.println("Test Case: "+(t+1)+" | Variable Output: "+n); }
    public static void help(int t,String n) { out.println("Test Case: "+(t+1)+" | Variable Output: "+n); }
    public static void help(int t,char[] n) { out.print("Test Case: "+(t+1)+" | Variable Output: "); for(char c:n) out.print(c+" "); out.println(); }
} import java.io.*; io.* java import java.util.*; util.* java import java.lang.*; lang.* java public class Main {
    public static MyScanner scan;
    public static PrintWriter out;
    public static void main(String[] args) {
        scan=new MyScanner();
        out=new PrintWriter(new BufferedOutputStream(System.out));

        int t=1;
//        int t=scan.nextInt();
        while(t-->0) {

            int n=scan.nextInt();
            int ac=0,tle=0,wa=0,re=0;
            while(n-->0) {
                String s=scan.nextLine();
                if(s.equals("AC")) ac++;
                else if(s.equals("TLE")) tle++;
                else if(s.equals("WA")) wa++;
                else re++;
            }
            out.println("AC x "+ac);
            out.println("WA x "+wa);
            out.println("TLE x "+tle);
            out.println("RE x "+re);
        }
        out.close();
    }

    //-----------------------------------------------------COMP-SPACE-----------------------------------------------------



    //--------------------------------------------------------------------------------------------------------------------

    //node
    static class Node implements Comparable<Node> {
        public int x,y;
        public Node(int x,int y) {
            this.x=x;
            this.y=y;
        }

        public int compareTo(Node other) {
            if(this.x==other.x) return 0;
            else if(this.x>other.x) return 1;
            else return -1;
        }

        public boolean equals(Node other) {
            return this.x==other.x;
        }

//        public int compareTo(Node other) {
//            if(this.y==other.y) return 0;
//            else if(this.y>other.y) return 1;
//            else return -1;
//        }
//
//        public boolean equals(Node other) {
//            return this.y==other.y;
//        }
    }
    //edge
    static class Edge implements Comparable<Edge> {
        public Node a,b;
        public int weight;

        public Edge(Node a,Node b,int weight) {
            this.a=a;
            this.b=b;
            this.weight=weight;
        }

        public int compareTo(Edge other) {
            if(this.weight==other.weight) return 0;
            else if(this.weight>other.weight) return 1;
            else return -1;
        }
    }

    //util
    public static int gcd(int a, int b) {
        if (b == 0)
            return a;
        if (a == 0)
            return b;
        return (a > b) ? gcd(a % b, b) : gcd(a, b % a);
    }

    public static int lcm(int a, int b) {
        return a * b / gcd(a, b);
    }

    public static int min(int a,int b) {
        if(a<=b) return a;
        else return b;
    }

    public static int max(int a,int b) {
        if(a>=b) return a;
        else return b;
    }

    public static int abs(int a) {
        if(a<0) return a*-1;
        else return a;
    }

    public static ArrayList<Integer> getPrimes(int n) {
        boolean prime[]=new boolean[n+1];
        Arrays.fill(prime,true);
        for (int p=2;p*p<=n;p++) {
            if (prime[p]) {
                for (int i=p*2;i<=n;i+=p) {
                    prime[i]=false;
                }
            }
        }
        ArrayList<Integer> primeNumbers=new ArrayList<Integer>();
        for (int i = 2; i <= n; i++) {
            if (prime[i]) {
                primeNumbers.add(i);
            }
        }
        return primeNumbers;
    }

    public static boolean isPrime(int a) {
        if (a == 0 || a == 1) {
            return false;
        }
        if (a == 2) {
            return true;
        }
        for (int i = 2; i < Math.sqrt(a) + 1; i++) {
            if (a % i == 0) {
                return false;
            }
        }
        return true;
    }

    public static ArrayList<Integer> getDivisors(int n) {
        ArrayList<Integer> div = new ArrayList<Integer>();
        for (int i=1;i*i<=n;i++) {
            if (n%i==0) {
                div.add(i);
                if (n/i!=i)
                    div.add(n/i);
            }
        }
        return div;
    }

    //scanner
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

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

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

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

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static int[] nextIntArray(int n) {
        int[] a=new int[n];
        for(int c=0;c<n;c++) a[c]=scan.nextInt();
        return a;
    }

    public static Integer[] nextIntegerArray(int n) {
        Integer[] a=new Integer[n];
        for(int c=0;c<n;c++) a[c]=scan.nextInt();
        return a;
    }

    public static int[][] nextIntMatrix(int n,int m) {
        int[][] a=new int[n][m];
        for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=scan.nextInt();
        return a;
    }

    public static Integer[][] nextIntegerMatrix(int n,int m) {
        Integer[][] a=new Integer[n][m];
        for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=scan.nextInt();
        return a;
    }

    //print
    public static void printIntArray(int[] a) {
        for(int c:a) out.print(c+" ");
        out.println();
    }

    public static void printIntegerArray(Integer[] a) {
        for(int c:a) out.print(c+" ");
        out.println();
    }

    public static void printIntMatrix(int[][] a) {
        for(int[] i:a) {
            for(int j:i) out.print(j+" ");
            out.println();
        }
    }

    public static void printIntegerMatrix(Integer[][] a) {
        for(Integer[] i:a) {
            for(Integer j:i) out.print(j+" ");
            out.println();
        }
    }

    public static void help(int t,int n) { out.println("Test Case: "+(t+1)+" | Variable Output: "+n); }
    public static void help(int t,String n) { out.println("Test Case: "+(t+1)+" | Variable Output: "+n); }
    public static void help(int t,char[] n) { out.print("Test Case: "+(t+1)+" | Variable Output: "); for(char c:n) out.print(c+" "); out.println(); }
} Main public static MyScanner scan; scan public static PrintWriter out; out public static void main(String[] args) {
        scan=new MyScanner();
        out=new PrintWriter(new BufferedOutputStream(System.out));

        int t=1;
//        int t=scan.nextInt();
        while(t-->0) {

            int n=scan.nextInt();
            int ac=0,tle=0,wa=0,re=0;
            while(n-->0) {
                String s=scan.nextLine();
                if(s.equals("AC")) ac++;
                else if(s.equals("TLE")) tle++;
                else if(s.equals("WA")) wa++;
                else re++;
            }
            out.println("AC x "+ac);
            out.println("WA x "+wa);
            out.println("TLE x "+tle);
            out.println("RE x "+re);
        }
        out.close();
    } main {
        scan=new MyScanner();
        out=new PrintWriter(new BufferedOutputStream(System.out));

        int t=1;
//        int t=scan.nextInt();
        while(t-->0) {

            int n=scan.nextInt();
            int ac=0,tle=0,wa=0,re=0;
            while(n-->0) {
                String s=scan.nextLine();
                if(s.equals("AC")) ac++;
                else if(s.equals("TLE")) tle++;
                else if(s.equals("WA")) wa++;
                else re++;
            }
            out.println("AC x "+ac);
            out.println("WA x "+wa);
            out.println("TLE x "+tle);
            out.println("RE x "+re);
        }
        out.close();
    } scan=new MyScanner() scan new MyScanner() out=new PrintWriter(new BufferedOutputStream(System.out)) out new PrintWriter(new BufferedOutputStream(System.out)) int t=1; t 1 while(t-->0) {

            int n=scan.nextInt();
            int ac=0,tle=0,wa=0,re=0;
            while(n-->0) {
                String s=scan.nextLine();
                if(s.equals("AC")) ac++;
                else if(s.equals("TLE")) tle++;
                else if(s.equals("WA")) wa++;
                else re++;
            }
            out.println("AC x "+ac);
            out.println("WA x "+wa);
            out.println("TLE x "+tle);
            out.println("RE x "+re);
        } t-->0 t-- t 0 {

            int n=scan.nextInt();
            int ac=0,tle=0,wa=0,re=0;
            while(n-->0) {
                String s=scan.nextLine();
                if(s.equals("AC")) ac++;
                else if(s.equals("TLE")) tle++;
                else if(s.equals("WA")) wa++;
                else re++;
            }
            out.println("AC x "+ac);
            out.println("WA x "+wa);
            out.println("TLE x "+tle);
            out.println("RE x "+re);
        } int n=scan.nextInt(); n scan.nextInt() scan.nextInt scan int ac=0 ac 0 tle=0 tle 0 wa=0 wa 0 re=0; re 0 while(n-->0) {
                String s=scan.nextLine();
                if(s.equals("AC")) ac++;
                else if(s.equals("TLE")) tle++;
                else if(s.equals("WA")) wa++;
                else re++;
            } n-->0 n-- n 0 {
                String s=scan.nextLine();
                if(s.equals("AC")) ac++;
                else if(s.equals("TLE")) tle++;
                else if(s.equals("WA")) wa++;
                else re++;
            } String s=scan.nextLine(); s scan.nextLine() scan.nextLine scan if(s.equals("AC")) ac++;
                else if(s.equals("TLE")) tle++;
                else if(s.equals("WA")) wa++;
                else re++; s.equals("AC") s.equals s "AC" ac++ ac if(s.equals("TLE")) tle++;
                else if(s.equals("WA")) wa++;
                else re++; s.equals("TLE") s.equals s "TLE" tle++ tle if(s.equals("WA")) wa++;
                else re++; s.equals("WA") s.equals s "WA" wa++ wa re++ re out.println("AC x "+ac) out.println out "AC x "+ac "AC x " ac out.println("WA x "+wa) out.println out "WA x "+wa "WA x " wa out.println("TLE x "+tle) out.println out "TLE x "+tle "TLE x " tle out.println("RE x "+re) out.println out "RE x "+re "RE x " re out.close() out.close out String[] args args //util
    public static int gcd(int a, int b) {
        if (b == 0)
            return a;
        if (a == 0)
            return b;
        return (a > b) ? gcd(a % b, b) : gcd(a, b % a);
    } gcd {
        if (b == 0)
            return a;
        if (a == 0)
            return b;
        return (a > b) ? gcd(a % b, b) : gcd(a, b % a);
    } if (b == 0)
            return a; b == 0 b 0 return a; a if (a == 0)
            return b; a == 0 a 0 return b; b return (a > b) ? gcd(a % b, b) : gcd(a, b % a); (a > b) ? gcd(a % b, b) : gcd(a, b % a) (a > b) a b gcd(a % b, b) gcd a % b a b b gcd(a, b % a) gcd a b % a b a int a a int b b public static int lcm(int a, int b) {
        return a * b / gcd(a, b);
    } lcm {
        return a * b / gcd(a, b);
    } return a * b / gcd(a, b); a * b / gcd(a, b) a * b a b gcd(a, b) gcd a b int a a int b b public static int min(int a,int b) {
        if(a<=b) return a;
        else return b;
    } min {
        if(a<=b) return a;
        else return b;
    } if(a<=b) return a;
        else return b; a<=b a b return a; a return b; b int a a int b b public static int max(int a,int b) {
        if(a>=b) return a;
        else return b;
    } max {
        if(a>=b) return a;
        else return b;
    } if(a>=b) return a;
        else return b; a>=b a b return a; a return b; b int a a int b b public static int abs(int a) {
        if(a<0) return a*-1;
        else return a;
    } abs {
        if(a<0) return a*-1;
        else return a;
    } if(a<0) return a*-1;
        else return a; a<0 a 0 return a*-1; a*-1 a -1 1 return a; a int a a public static ArrayList<Integer> getPrimes(int n) {
        boolean prime[]=new boolean[n+1];
        Arrays.fill(prime,true);
        for (int p=2;p*p<=n;p++) {
            if (prime[p]) {
                for (int i=p*2;i<=n;i+=p) {
                    prime[i]=false;
                }
            }
        }
        ArrayList<Integer> primeNumbers=new ArrayList<Integer>();
        for (int i = 2; i <= n; i++) {
            if (prime[i]) {
                primeNumbers.add(i);
            }
        }
        return primeNumbers;
    } getPrimes {
        boolean prime[]=new boolean[n+1];
        Arrays.fill(prime,true);
        for (int p=2;p*p<=n;p++) {
            if (prime[p]) {
                for (int i=p*2;i<=n;i+=p) {
                    prime[i]=false;
                }
            }
        }
        ArrayList<Integer> primeNumbers=new ArrayList<Integer>();
        for (int i = 2; i <= n; i++) {
            if (prime[i]) {
                primeNumbers.add(i);
            }
        }
        return primeNumbers;
    } boolean prime[]=new boolean[n+1]; prime new boolean[n+1] n+1 n 1 Arrays.fill(prime,true) Arrays.fill Arrays prime true for (int p=2;p*p<=n;p++) {
            if (prime[p]) {
                for (int i=p*2;i<=n;i+=p) {
                    prime[i]=false;
                }
            }
        } int p=2; int p=2; p 2 p*p<=n p*p p p n p++ p++ p {
            if (prime[p]) {
                for (int i=p*2;i<=n;i+=p) {
                    prime[i]=false;
                }
            }
        } {
            if (prime[p]) {
                for (int i=p*2;i<=n;i+=p) {
                    prime[i]=false;
                }
            }
        } if (prime[p]) {
                for (int i=p*2;i<=n;i+=p) {
                    prime[i]=false;
                }
            } prime[p] prime p {
                for (int i=p*2;i<=n;i+=p) {
                    prime[i]=false;
                }
            } for (int i=p*2;i<=n;i+=p) {
                    prime[i]=false;
                } int i=p*2; int i=p*2; i p*2 p 2 i<=n i n i+=p i+=p i p {
                    prime[i]=false;
                } {
                    prime[i]=false;
                } prime[i]=false prime[i] prime i false ArrayList<Integer> primeNumbers=new ArrayList<Integer>(); primeNumbers new ArrayList<Integer>() for (int i = 2; i <= n; i++) {
            if (prime[i]) {
                primeNumbers.add(i);
            }
        } int i = 2; int i = 2; i 2 i <= n i n i++ i++ i {
            if (prime[i]) {
                primeNumbers.add(i);
            }
        } {
            if (prime[i]) {
                primeNumbers.add(i);
            }
        } if (prime[i]) {
                primeNumbers.add(i);
            } prime[i] prime i {
                primeNumbers.add(i);
            } primeNumbers.add(i) primeNumbers.add primeNumbers i return primeNumbers; primeNumbers int n n public static boolean isPrime(int a) {
        if (a == 0 || a == 1) {
            return false;
        }
        if (a == 2) {
            return true;
        }
        for (int i = 2; i < Math.sqrt(a) + 1; i++) {
            if (a % i == 0) {
                return false;
            }
        }
        return true;
    } isPrime {
        if (a == 0 || a == 1) {
            return false;
        }
        if (a == 2) {
            return true;
        }
        for (int i = 2; i < Math.sqrt(a) + 1; i++) {
            if (a % i == 0) {
                return false;
            }
        }
        return true;
    } if (a == 0 || a == 1) {
            return false;
        } a == 0 || a == 1 a == 0 a 0 a == 1 a 1 {
            return false;
        } return false; false if (a == 2) {
            return true;
        } a == 2 a 2 {
            return true;
        } return true; true for (int i = 2; i < Math.sqrt(a) + 1; i++) {
            if (a % i == 0) {
                return false;
            }
        } int i = 2; int i = 2; i 2 i < Math.sqrt(a) + 1 i Math.sqrt(a) + 1 Math.sqrt(a) Math.sqrt Math a 1 i++ i++ i {
            if (a % i == 0) {
                return false;
            }
        } {
            if (a % i == 0) {
                return false;
            }
        } if (a % i == 0) {
                return false;
            } a % i == 0 a % i a i 0 {
                return false;
            } return false; false return true; true int a a public static ArrayList<Integer> getDivisors(int n) {
        ArrayList<Integer> div = new ArrayList<Integer>();
        for (int i=1;i*i<=n;i++) {
            if (n%i==0) {
                div.add(i);
                if (n/i!=i)
                    div.add(n/i);
            }
        }
        return div;
    } getDivisors {
        ArrayList<Integer> div = new ArrayList<Integer>();
        for (int i=1;i*i<=n;i++) {
            if (n%i==0) {
                div.add(i);
                if (n/i!=i)
                    div.add(n/i);
            }
        }
        return div;
    } ArrayList<Integer> div = new ArrayList<Integer>(); div new ArrayList<Integer>() for (int i=1;i*i<=n;i++) {
            if (n%i==0) {
                div.add(i);
                if (n/i!=i)
                    div.add(n/i);
            }
        } int i=1; int i=1; i 1 i*i<=n i*i i i n i++ i++ i {
            if (n%i==0) {
                div.add(i);
                if (n/i!=i)
                    div.add(n/i);
            }
        } {
            if (n%i==0) {
                div.add(i);
                if (n/i!=i)
                    div.add(n/i);
            }
        } if (n%i==0) {
                div.add(i);
                if (n/i!=i)
                    div.add(n/i);
            } n%i==0 n%i n i 0 {
                div.add(i);
                if (n/i!=i)
                    div.add(n/i);
            } div.add(i) div.add div i if (n/i!=i)
                    div.add(n/i); n/i!=i n/i n i i div.add(n/i) div.add div n/i n i return div; div int n n public static int[] nextIntArray(int n) {
        int[] a=new int[n];
        for(int c=0;c<n;c++) a[c]=scan.nextInt();
        return a;
    } nextIntArray {
        int[] a=new int[n];
        for(int c=0;c<n;c++) a[c]=scan.nextInt();
        return a;
    } int[] a=new int[n]; a new int[n] n for(int c=0;c<n;c++) a[c]=scan.nextInt(); int c=0; int c=0; c 0 c<n c n c++ c++ c a[c]=scan.nextInt(); a[c]=scan.nextInt() a[c] a c scan.nextInt() scan.nextInt scan return a; a int n n public static Integer[] nextIntegerArray(int n) {
        Integer[] a=new Integer[n];
        for(int c=0;c<n;c++) a[c]=scan.nextInt();
        return a;
    } nextIntegerArray {
        Integer[] a=new Integer[n];
        for(int c=0;c<n;c++) a[c]=scan.nextInt();
        return a;
    } Integer[] a=new Integer[n]; a new Integer[n] n for(int c=0;c<n;c++) a[c]=scan.nextInt(); int c=0; int c=0; c 0 c<n c n c++ c++ c a[c]=scan.nextInt(); a[c]=scan.nextInt() a[c] a c scan.nextInt() scan.nextInt scan return a; a int n n public static int[][] nextIntMatrix(int n,int m) {
        int[][] a=new int[n][m];
        for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=scan.nextInt();
        return a;
    } nextIntMatrix {
        int[][] a=new int[n][m];
        for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=scan.nextInt();
        return a;
    } int[][] a=new int[n][m]; a new int[n][m] n m for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=scan.nextInt(); int i=0; int i=0; i 0 i<n i n i++ i++ i for(int j=0;j<m;j++) a[i][j]=scan.nextInt(); for(int j=0;j<m;j++) a[i][j]=scan.nextInt(); int j=0; int j=0; j 0 j<m j m j++ j++ j a[i][j]=scan.nextInt(); a[i][j]=scan.nextInt() a[i][j] a[i] a i j scan.nextInt() scan.nextInt scan return a; a int n n int m m public static Integer[][] nextIntegerMatrix(int n,int m) {
        Integer[][] a=new Integer[n][m];
        for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=scan.nextInt();
        return a;
    } nextIntegerMatrix {
        Integer[][] a=new Integer[n][m];
        for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=scan.nextInt();
        return a;
    } Integer[][] a=new Integer[n][m]; a new Integer[n][m] n m for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=scan.nextInt(); int i=0; int i=0; i 0 i<n i n i++ i++ i for(int j=0;j<m;j++) a[i][j]=scan.nextInt(); for(int j=0;j<m;j++) a[i][j]=scan.nextInt(); int j=0; int j=0; j 0 j<m j m j++ j++ j a[i][j]=scan.nextInt(); a[i][j]=scan.nextInt() a[i][j] a[i] a i j scan.nextInt() scan.nextInt scan return a; a int n n int m m //print
    public static void printIntArray(int[] a) {
        for(int c:a) out.print(c+" ");
        out.println();
    } printIntArray {
        for(int c:a) out.print(c+" ");
        out.println();
    } for(int c:a) out.print(c+" "); int c a out.print(c+" "); out.print(c+" ") out.print out c+" " c " " out.println() out.println out int[] a a public static void printIntegerArray(Integer[] a) {
        for(int c:a) out.print(c+" ");
        out.println();
    } printIntegerArray {
        for(int c:a) out.print(c+" ");
        out.println();
    } for(int c:a) out.print(c+" "); int c a out.print(c+" "); out.print(c+" ") out.print out c+" " c " " out.println() out.println out Integer[] a a public static void printIntMatrix(int[][] a) {
        for(int[] i:a) {
            for(int j:i) out.print(j+" ");
            out.println();
        }
    } printIntMatrix {
        for(int[] i:a) {
            for(int j:i) out.print(j+" ");
            out.println();
        }
    } for(int[] i:a) {
            for(int j:i) out.print(j+" ");
            out.println();
        } int[] i a {
            for(int j:i) out.print(j+" ");
            out.println();
        } {
            for(int j:i) out.print(j+" ");
            out.println();
        } for(int j:i) out.print(j+" "); int j i out.print(j+" "); out.print(j+" ") out.print out j+" " j " " out.println() out.println out int[][] a a public static void printIntegerMatrix(Integer[][] a) {
        for(Integer[] i:a) {
            for(Integer j:i) out.print(j+" ");
            out.println();
        }
    } printIntegerMatrix {
        for(Integer[] i:a) {
            for(Integer j:i) out.print(j+" ");
            out.println();
        }
    } for(Integer[] i:a) {
            for(Integer j:i) out.print(j+" ");
            out.println();
        } Integer[] i a {
            for(Integer j:i) out.print(j+" ");
            out.println();
        } {
            for(Integer j:i) out.print(j+" ");
            out.println();
        } for(Integer j:i) out.print(j+" "); Integer j i out.print(j+" "); out.print(j+" ") out.print out j+" " j " " out.println() out.println out Integer[][] a a public static void help(int t,int n) { out.println("Test Case: "+(t+1)+" | Variable Output: "+n); } help { out.println("Test Case: "+(t+1)+" | Variable Output: "+n); } out.println("Test Case: "+(t+1)+" | Variable Output: "+n) out.println out "Test Case: "+(t+1)+" | Variable Output: "+n " | Variable Output: " "Test Case: "+(t+1)+" | Variable Output: "+n "Test Case: " (t+1) t 1 " | Variable Output: " n int t t int n n public static void help(int t,String n) { out.println("Test Case: "+(t+1)+" | Variable Output: "+n); } help { out.println("Test Case: "+(t+1)+" | Variable Output: "+n); } out.println("Test Case: "+(t+1)+" | Variable Output: "+n) out.println out "Test Case: "+(t+1)+" | Variable Output: "+n " | Variable Output: " "Test Case: "+(t+1)+" | Variable Output: "+n "Test Case: " (t+1) t 1 " | Variable Output: " n int t t String n n public static void help(int t,char[] n) { out.print("Test Case: "+(t+1)+" | Variable Output: "); for(char c:n) out.print(c+" "); out.println(); } help { out.print("Test Case: "+(t+1)+" | Variable Output: "); for(char c:n) out.print(c+" "); out.println(); } out.print("Test Case: "+(t+1)+" | Variable Output: ") out.print out "Test Case: "+(t+1)+" | Variable Output: " "Test Case: "+(t+1)+" | Variable Output: " "Test Case: " (t+1) t 1 " | Variable Output: " for(char c:n) out.print(c+" "); char c n out.print(c+" "); out.print(c+" ") out.print out c+" " c " " out.println() out.println out int t t char[] n n static class Node implements Comparable<Node> {
        public int x,y;
        public Node(int x,int y) {
            this.x=x;
            this.y=y;
        }

        public int compareTo(Node other) {
            if(this.x==other.x) return 0;
            else if(this.x>other.x) return 1;
            else return -1;
        }

        public boolean equals(Node other) {
            return this.x==other.x;
        }

//        public int compareTo(Node other) {
//            if(this.y==other.y) return 0;
//            else if(this.y>other.y) return 1;
//            else return -1;
//        }
//
//        public boolean equals(Node other) {
//            return this.y==other.y;
//        }
    } Node public int x x y; y public Node(int x,int y) {
            this.x=x;
            this.y=y;
        } Node {
            this.x=x;
            this.y=y;
        } this.x=x this.x this this.x x this.y=y this.y this this.y y int x x int y y public int compareTo(Node other) {
            if(this.x==other.x) return 0;
            else if(this.x>other.x) return 1;
            else return -1;
        } compareTo {
            if(this.x==other.x) return 0;
            else if(this.x>other.x) return 1;
            else return -1;
        } if(this.x==other.x) return 0;
            else if(this.x>other.x) return 1;
            else return -1; this.x==other.x this.x this this.x other.x other other.x return 0; 0 if(this.x>other.x) return 1;
            else return -1; this.x>other.x this.x this this.x other.x other other.x return 1; 1 return -1; -1 1 Node other other public boolean equals(Node other) {
            return this.x==other.x;
        } equals {
            return this.x==other.x;
        } return this.x==other.x; this.x==other.x this.x this this.x other.x other other.x Node other other Comparable static class Edge implements Comparable<Edge> {
        public Node a,b;
        public int weight;

        public Edge(Node a,Node b,int weight) {
            this.a=a;
            this.b=b;
            this.weight=weight;
        }

        public int compareTo(Edge other) {
            if(this.weight==other.weight) return 0;
            else if(this.weight>other.weight) return 1;
            else return -1;
        }
    } Edge public Node a a b; b public int weight; weight public Edge(Node a,Node b,int weight) {
            this.a=a;
            this.b=b;
            this.weight=weight;
        } Edge {
            this.a=a;
            this.b=b;
            this.weight=weight;
        } this.a=a this.a this this.a a this.b=b this.b this this.b b this.weight=weight this.weight this this.weight weight Node a a Node b b int weight weight public int compareTo(Edge other) {
            if(this.weight==other.weight) return 0;
            else if(this.weight>other.weight) return 1;
            else return -1;
        } compareTo {
            if(this.weight==other.weight) return 0;
            else if(this.weight>other.weight) return 1;
            else return -1;
        } if(this.weight==other.weight) return 0;
            else if(this.weight>other.weight) return 1;
            else return -1; this.weight==other.weight this.weight this this.weight other.weight other other.weight return 0; 0 if(this.weight>other.weight) return 1;
            else return -1; this.weight>other.weight this.weight this this.weight other.weight other other.weight return 1; 1 return -1; -1 1 Edge other other Comparable public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

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

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

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

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    } MyScanner BufferedReader br; br StringTokenizer st; st public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        } MyScanner {
            br = new BufferedReader(new InputStreamReader(System.in));
        } br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } next {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } 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 long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble() {
            return Double.parseDouble(next());
        } nextDouble {
            return Double.parseDouble(next());
        } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } nextLine {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } String str = ""; str "" try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } IOException e {
                e.printStackTrace();
            } e.printStackTrace() e.printStackTrace e {
                str = br.readLine();
            } str = br.readLine() str br.readLine() br.readLine br return str; str public class Main {
    public static MyScanner scan;
    public static PrintWriter out;
    public static void main(String[] args) {
        scan=new MyScanner();
        out=new PrintWriter(new BufferedOutputStream(System.out));

        int t=1;
//        int t=scan.nextInt();
        while(t-->0) {

            int n=scan.nextInt();
            int ac=0,tle=0,wa=0,re=0;
            while(n-->0) {
                String s=scan.nextLine();
                if(s.equals("AC")) ac++;
                else if(s.equals("TLE")) tle++;
                else if(s.equals("WA")) wa++;
                else re++;
            }
            out.println("AC x "+ac);
            out.println("WA x "+wa);
            out.println("TLE x "+tle);
            out.println("RE x "+re);
        }
        out.close();
    }

    //-----------------------------------------------------COMP-SPACE-----------------------------------------------------



    //--------------------------------------------------------------------------------------------------------------------

    //node
    static class Node implements Comparable<Node> {
        public int x,y;
        public Node(int x,int y) {
            this.x=x;
            this.y=y;
        }

        public int compareTo(Node other) {
            if(this.x==other.x) return 0;
            else if(this.x>other.x) return 1;
            else return -1;
        }

        public boolean equals(Node other) {
            return this.x==other.x;
        }

//        public int compareTo(Node other) {
//            if(this.y==other.y) return 0;
//            else if(this.y>other.y) return 1;
//            else return -1;
//        }
//
//        public boolean equals(Node other) {
//            return this.y==other.y;
//        }
    }
    //edge
    static class Edge implements Comparable<Edge> {
        public Node a,b;
        public int weight;

        public Edge(Node a,Node b,int weight) {
            this.a=a;
            this.b=b;
            this.weight=weight;
        }

        public int compareTo(Edge other) {
            if(this.weight==other.weight) return 0;
            else if(this.weight>other.weight) return 1;
            else return -1;
        }
    }

    //util
    public static int gcd(int a, int b) {
        if (b == 0)
            return a;
        if (a == 0)
            return b;
        return (a > b) ? gcd(a % b, b) : gcd(a, b % a);
    }

    public static int lcm(int a, int b) {
        return a * b / gcd(a, b);
    }

    public static int min(int a,int b) {
        if(a<=b) return a;
        else return b;
    }

    public static int max(int a,int b) {
        if(a>=b) return a;
        else return b;
    }

    public static int abs(int a) {
        if(a<0) return a*-1;
        else return a;
    }

    public static ArrayList<Integer> getPrimes(int n) {
        boolean prime[]=new boolean[n+1];
        Arrays.fill(prime,true);
        for (int p=2;p*p<=n;p++) {
            if (prime[p]) {
                for (int i=p*2;i<=n;i+=p) {
                    prime[i]=false;
                }
            }
        }
        ArrayList<Integer> primeNumbers=new ArrayList<Integer>();
        for (int i = 2; i <= n; i++) {
            if (prime[i]) {
                primeNumbers.add(i);
            }
        }
        return primeNumbers;
    }

    public static boolean isPrime(int a) {
        if (a == 0 || a == 1) {
            return false;
        }
        if (a == 2) {
            return true;
        }
        for (int i = 2; i < Math.sqrt(a) + 1; i++) {
            if (a % i == 0) {
                return false;
            }
        }
        return true;
    }

    public static ArrayList<Integer> getDivisors(int n) {
        ArrayList<Integer> div = new ArrayList<Integer>();
        for (int i=1;i*i<=n;i++) {
            if (n%i==0) {
                div.add(i);
                if (n/i!=i)
                    div.add(n/i);
            }
        }
        return div;
    }

    //scanner
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

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

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

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

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static int[] nextIntArray(int n) {
        int[] a=new int[n];
        for(int c=0;c<n;c++) a[c]=scan.nextInt();
        return a;
    }

    public static Integer[] nextIntegerArray(int n) {
        Integer[] a=new Integer[n];
        for(int c=0;c<n;c++) a[c]=scan.nextInt();
        return a;
    }

    public static int[][] nextIntMatrix(int n,int m) {
        int[][] a=new int[n][m];
        for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=scan.nextInt();
        return a;
    }

    public static Integer[][] nextIntegerMatrix(int n,int m) {
        Integer[][] a=new Integer[n][m];
        for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=scan.nextInt();
        return a;
    }

    //print
    public static void printIntArray(int[] a) {
        for(int c:a) out.print(c+" ");
        out.println();
    }

    public static void printIntegerArray(Integer[] a) {
        for(int c:a) out.print(c+" ");
        out.println();
    }

    public static void printIntMatrix(int[][] a) {
        for(int[] i:a) {
            for(int j:i) out.print(j+" ");
            out.println();
        }
    }

    public static void printIntegerMatrix(Integer[][] a) {
        for(Integer[] i:a) {
            for(Integer j:i) out.print(j+" ");
            out.println();
        }
    }

    public static void help(int t,int n) { out.println("Test Case: "+(t+1)+" | Variable Output: "+n); }
    public static void help(int t,String n) { out.println("Test Case: "+(t+1)+" | Variable Output: "+n); }
    public static void help(int t,char[] n) { out.print("Test Case: "+(t+1)+" | Variable Output: "); for(char c:n) out.print(c+" "); out.println(); }
} public class Main {
    public static MyScanner scan;
    public static PrintWriter out;
    public static void main(String[] args) {
        scan=new MyScanner();
        out=new PrintWriter(new BufferedOutputStream(System.out));

        int t=1;
//        int t=scan.nextInt();
        while(t-->0) {

            int n=scan.nextInt();
            int ac=0,tle=0,wa=0,re=0;
            while(n-->0) {
                String s=scan.nextLine();
                if(s.equals("AC")) ac++;
                else if(s.equals("TLE")) tle++;
                else if(s.equals("WA")) wa++;
                else re++;
            }
            out.println("AC x "+ac);
            out.println("WA x "+wa);
            out.println("TLE x "+tle);
            out.println("RE x "+re);
        }
        out.close();
    }

    //-----------------------------------------------------COMP-SPACE-----------------------------------------------------



    //--------------------------------------------------------------------------------------------------------------------

    //node
    static class Node implements Comparable<Node> {
        public int x,y;
        public Node(int x,int y) {
            this.x=x;
            this.y=y;
        }

        public int compareTo(Node other) {
            if(this.x==other.x) return 0;
            else if(this.x>other.x) return 1;
            else return -1;
        }

        public boolean equals(Node other) {
            return this.x==other.x;
        }

//        public int compareTo(Node other) {
//            if(this.y==other.y) return 0;
//            else if(this.y>other.y) return 1;
//            else return -1;
//        }
//
//        public boolean equals(Node other) {
//            return this.y==other.y;
//        }
    }
    //edge
    static class Edge implements Comparable<Edge> {
        public Node a,b;
        public int weight;

        public Edge(Node a,Node b,int weight) {
            this.a=a;
            this.b=b;
            this.weight=weight;
        }

        public int compareTo(Edge other) {
            if(this.weight==other.weight) return 0;
            else if(this.weight>other.weight) return 1;
            else return -1;
        }
    }

    //util
    public static int gcd(int a, int b) {
        if (b == 0)
            return a;
        if (a == 0)
            return b;
        return (a > b) ? gcd(a % b, b) : gcd(a, b % a);
    }

    public static int lcm(int a, int b) {
        return a * b / gcd(a, b);
    }

    public static int min(int a,int b) {
        if(a<=b) return a;
        else return b;
    }

    public static int max(int a,int b) {
        if(a>=b) return a;
        else return b;
    }

    public static int abs(int a) {
        if(a<0) return a*-1;
        else return a;
    }

    public static ArrayList<Integer> getPrimes(int n) {
        boolean prime[]=new boolean[n+1];
        Arrays.fill(prime,true);
        for (int p=2;p*p<=n;p++) {
            if (prime[p]) {
                for (int i=p*2;i<=n;i+=p) {
                    prime[i]=false;
                }
            }
        }
        ArrayList<Integer> primeNumbers=new ArrayList<Integer>();
        for (int i = 2; i <= n; i++) {
            if (prime[i]) {
                primeNumbers.add(i);
            }
        }
        return primeNumbers;
    }

    public static boolean isPrime(int a) {
        if (a == 0 || a == 1) {
            return false;
        }
        if (a == 2) {
            return true;
        }
        for (int i = 2; i < Math.sqrt(a) + 1; i++) {
            if (a % i == 0) {
                return false;
            }
        }
        return true;
    }

    public static ArrayList<Integer> getDivisors(int n) {
        ArrayList<Integer> div = new ArrayList<Integer>();
        for (int i=1;i*i<=n;i++) {
            if (n%i==0) {
                div.add(i);
                if (n/i!=i)
                    div.add(n/i);
            }
        }
        return div;
    }

    //scanner
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

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

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

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

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static int[] nextIntArray(int n) {
        int[] a=new int[n];
        for(int c=0;c<n;c++) a[c]=scan.nextInt();
        return a;
    }

    public static Integer[] nextIntegerArray(int n) {
        Integer[] a=new Integer[n];
        for(int c=0;c<n;c++) a[c]=scan.nextInt();
        return a;
    }

    public static int[][] nextIntMatrix(int n,int m) {
        int[][] a=new int[n][m];
        for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=scan.nextInt();
        return a;
    }

    public static Integer[][] nextIntegerMatrix(int n,int m) {
        Integer[][] a=new Integer[n][m];
        for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=scan.nextInt();
        return a;
    }

    //print
    public static void printIntArray(int[] a) {
        for(int c:a) out.print(c+" ");
        out.println();
    }

    public static void printIntegerArray(Integer[] a) {
        for(int c:a) out.print(c+" ");
        out.println();
    }

    public static void printIntMatrix(int[][] a) {
        for(int[] i:a) {
            for(int j:i) out.print(j+" ");
            out.println();
        }
    }

    public static void printIntegerMatrix(Integer[][] a) {
        for(Integer[] i:a) {
            for(Integer j:i) out.print(j+" ");
            out.println();
        }
    }

    public static void help(int t,int n) { out.println("Test Case: "+(t+1)+" | Variable Output: "+n); }
    public static void help(int t,String n) { out.println("Test Case: "+(t+1)+" | Variable Output: "+n); }
    public static void help(int t,char[] n) { out.print("Test Case: "+(t+1)+" | Variable Output: "); for(char c:n) out.print(c+" "); out.println(); }
} Main
import java.io.*;
import java.util.*;
import java.lang.*;

public class Main {
    public static MyScanner scan;
    public static PrintWriter out;
    public static void main(String[] args) {
        scan=new MyScanner();
        out=new PrintWriter(new BufferedOutputStream(System.out));

        int t=1;
//        int t=scan.nextInt();
        while(t-->0) {

            int n=scan.nextInt();
            int ac=0,tle=0,wa=0,re=0;
            while(n-->0) {
                String s=scan.nextLine();
                if(s.equals("AC")) ac++;
                else if(s.equals("TLE")) tle++;
                else if(s.equals("WA")) wa++;
                else re++;
            }
            out.println("AC x "+ac);
            out.println("WA x "+wa);
            out.println("TLE x "+tle);
            out.println("RE x "+re);
        }
        out.close();
    }

    //-----------------------------------------------------COMP-SPACE-----------------------------------------------------



    //--------------------------------------------------------------------------------------------------------------------

    //node
    static class Node implements Comparable<Node> {
        public int x,y;
        public Node(int x,int y) {
            this.x=x;
            this.y=y;
        }

        public int compareTo(Node other) {
            if(this.x==other.x) return 0;
            else if(this.x>other.x) return 1;
            else return -1;
        }

        public boolean equals(Node other) {
            return this.x==other.x;
        }

//        public int compareTo(Node other) {
//            if(this.y==other.y) return 0;
//            else if(this.y>other.y) return 1;
//            else return -1;
//        }
//
//        public boolean equals(Node other) {
//            return this.y==other.y;
//        }
    }
    //edge
    static class Edge implements Comparable<Edge> {
        public Node a,b;
        public int weight;

        public Edge(Node a,Node b,int weight) {
            this.a=a;
            this.b=b;
            this.weight=weight;
        }

        public int compareTo(Edge other) {
            if(this.weight==other.weight) return 0;
            else if(this.weight>other.weight) return 1;
            else return -1;
        }
    }

    //util
    public static int gcd(int a, int b) {
        if (b == 0)
            return a;
        if (a == 0)
            return b;
        return (a > b) ? gcd(a % b, b) : gcd(a, b % a);
    }

    public static int lcm(int a, int b) {
        return a * b / gcd(a, b);
    }

    public static int min(int a,int b) {
        if(a<=b) return a;
        else return b;
    }

    public static int max(int a,int b) {
        if(a>=b) return a;
        else return b;
    }

    public static int abs(int a) {
        if(a<0) return a*-1;
        else return a;
    }

    public static ArrayList<Integer> getPrimes(int n) {
        boolean prime[]=new boolean[n+1];
        Arrays.fill(prime,true);
        for (int p=2;p*p<=n;p++) {
            if (prime[p]) {
                for (int i=p*2;i<=n;i+=p) {
                    prime[i]=false;
                }
            }
        }
        ArrayList<Integer> primeNumbers=new ArrayList<Integer>();
        for (int i = 2; i <= n; i++) {
            if (prime[i]) {
                primeNumbers.add(i);
            }
        }
        return primeNumbers;
    }

    public static boolean isPrime(int a) {
        if (a == 0 || a == 1) {
            return false;
        }
        if (a == 2) {
            return true;
        }
        for (int i = 2; i < Math.sqrt(a) + 1; i++) {
            if (a % i == 0) {
                return false;
            }
        }
        return true;
    }

    public static ArrayList<Integer> getDivisors(int n) {
        ArrayList<Integer> div = new ArrayList<Integer>();
        for (int i=1;i*i<=n;i++) {
            if (n%i==0) {
                div.add(i);
                if (n/i!=i)
                    div.add(n/i);
            }
        }
        return div;
    }

    //scanner
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

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

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

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

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static int[] nextIntArray(int n) {
        int[] a=new int[n];
        for(int c=0;c<n;c++) a[c]=scan.nextInt();
        return a;
    }

    public static Integer[] nextIntegerArray(int n) {
        Integer[] a=new Integer[n];
        for(int c=0;c<n;c++) a[c]=scan.nextInt();
        return a;
    }

    public static int[][] nextIntMatrix(int n,int m) {
        int[][] a=new int[n][m];
        for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=scan.nextInt();
        return a;
    }

    public static Integer[][] nextIntegerMatrix(int n,int m) {
        Integer[][] a=new Integer[n][m];
        for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=scan.nextInt();
        return a;
    }

    //print
    public static void printIntArray(int[] a) {
        for(int c:a) out.print(c+" ");
        out.println();
    }

    public static void printIntegerArray(Integer[] a) {
        for(int c:a) out.print(c+" ");
        out.println();
    }

    public static void printIntMatrix(int[][] a) {
        for(int[] i:a) {
            for(int j:i) out.print(j+" ");
            out.println();
        }
    }

    public static void printIntegerMatrix(Integer[][] a) {
        for(Integer[] i:a) {
            for(Integer j:i) out.print(j+" ");
            out.println();
        }
    }

    public static void help(int t,int n) { out.println("Test Case: "+(t+1)+" | Variable Output: "+n); }
    public static void help(int t,String n) { out.println("Test Case: "+(t+1)+" | Variable Output: "+n); }
    public static void help(int t,char[] n) { out.print("Test Case: "+(t+1)+" | Variable Output: "); for(char c:n) out.print(c+" "); out.println(); }
}