import java.util.*;
public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();

        int[] arr = new int[4];
        while (t-- > 0) {
            String s = sc.next();
            if (s.equals("AC")) {
                arr[0]++;
            } else if (s.equals("WA")) {
                arr[1]++;
            } else if (s.equals("TLE")) {
                arr[2]++;
            } else {
                arr[3]++;
            }
        }
        
        System.out.println("AC x " + arr[0]);
        System.out.println("WA x " + arr[1]);
        System.out.println("TLE x " + arr[2]);
        System.out.println("RE x " + arr[3]);
 
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();

        int[] arr = new int[4];
        while (t-- > 0) {
            String s = sc.next();
            if (s.equals("AC")) {
                arr[0]++;
            } else if (s.equals("WA")) {
                arr[1]++;
            } else if (s.equals("TLE")) {
                arr[2]++;
            } else {
                arr[3]++;
            }
        }
        
        System.out.println("AC x " + arr[0]);
        System.out.println("WA x " + arr[1]);
        System.out.println("TLE x " + arr[2]);
        System.out.println("RE x " + arr[3]);
 
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();

        int[] arr = new int[4];
        while (t-- > 0) {
            String s = sc.next();
            if (s.equals("AC")) {
                arr[0]++;
            } else if (s.equals("WA")) {
                arr[1]++;
            } else if (s.equals("TLE")) {
                arr[2]++;
            } else {
                arr[3]++;
            }
        }
        
        System.out.println("AC x " + arr[0]);
        System.out.println("WA x " + arr[1]);
        System.out.println("TLE x " + arr[2]);
        System.out.println("RE x " + arr[3]);
 
    } main {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();

        int[] arr = new int[4];
        while (t-- > 0) {
            String s = sc.next();
            if (s.equals("AC")) {
                arr[0]++;
            } else if (s.equals("WA")) {
                arr[1]++;
            } else if (s.equals("TLE")) {
                arr[2]++;
            } else {
                arr[3]++;
            }
        }
        
        System.out.println("AC x " + arr[0]);
        System.out.println("WA x " + arr[1]);
        System.out.println("TLE x " + arr[2]);
        System.out.println("RE x " + arr[3]);
 
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int t = sc.nextInt(); t sc.nextInt() sc.nextInt sc int[] arr = new int[4]; arr new int[4] 4 while (t-- > 0) {
            String s = sc.next();
            if (s.equals("AC")) {
                arr[0]++;
            } else if (s.equals("WA")) {
                arr[1]++;
            } else if (s.equals("TLE")) {
                arr[2]++;
            } else {
                arr[3]++;
            }
        } t-- > 0 t-- t 0 {
            String s = sc.next();
            if (s.equals("AC")) {
                arr[0]++;
            } else if (s.equals("WA")) {
                arr[1]++;
            } else if (s.equals("TLE")) {
                arr[2]++;
            } else {
                arr[3]++;
            }
        } String s = sc.next(); s sc.next() sc.next sc if (s.equals("AC")) {
                arr[0]++;
            } else if (s.equals("WA")) {
                arr[1]++;
            } else if (s.equals("TLE")) {
                arr[2]++;
            } else {
                arr[3]++;
            } s.equals("AC") s.equals s "AC" {
                arr[0]++;
            } arr[0]++ arr[0] arr 0 if (s.equals("WA")) {
                arr[1]++;
            } else if (s.equals("TLE")) {
                arr[2]++;
            } else {
                arr[3]++;
            } s.equals("WA") s.equals s "WA" {
                arr[1]++;
            } arr[1]++ arr[1] arr 1 if (s.equals("TLE")) {
                arr[2]++;
            } else {
                arr[3]++;
            } s.equals("TLE") s.equals s "TLE" {
                arr[2]++;
            } arr[2]++ arr[2] arr 2 {
                arr[3]++;
            } arr[3]++ arr[3] arr 3 System.out.println("AC x " + arr[0]) System.out.println System.out System System.out "AC x " + arr[0] "AC x " arr[0] arr 0 System.out.println("WA x " + arr[1]) System.out.println System.out System System.out "WA x " + arr[1] "WA x " arr[1] arr 1 System.out.println("TLE x " + arr[2]) System.out.println System.out System System.out "TLE x " + arr[2] "TLE x " arr[2] arr 2 System.out.println("RE x " + arr[3]) System.out.println System.out System System.out "RE x " + arr[3] "RE x " arr[3] arr 3 String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();

        int[] arr = new int[4];
        while (t-- > 0) {
            String s = sc.next();
            if (s.equals("AC")) {
                arr[0]++;
            } else if (s.equals("WA")) {
                arr[1]++;
            } else if (s.equals("TLE")) {
                arr[2]++;
            } else {
                arr[3]++;
            }
        }
        
        System.out.println("AC x " + arr[0]);
        System.out.println("WA x " + arr[1]);
        System.out.println("TLE x " + arr[2]);
        System.out.println("RE x " + arr[3]);
 
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();

        int[] arr = new int[4];
        while (t-- > 0) {
            String s = sc.next();
            if (s.equals("AC")) {
                arr[0]++;
            } else if (s.equals("WA")) {
                arr[1]++;
            } else if (s.equals("TLE")) {
                arr[2]++;
            } else {
                arr[3]++;
            }
        }
        
        System.out.println("AC x " + arr[0]);
        System.out.println("WA x " + arr[1]);
        System.out.println("TLE x " + arr[2]);
        System.out.println("RE x " + arr[3]);
 
    }
} Main
import java.util.*;
public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();

        int[] arr = new int[4];
        while (t-- > 0) {
            String s = sc.next();
            if (s.equals("AC")) {
                arr[0]++;
            } else if (s.equals("WA")) {
                arr[1]++;
            } else if (s.equals("TLE")) {
                arr[2]++;
            } else {
                arr[3]++;
            }
        }
        
        System.out.println("AC x " + arr[0]);
        System.out.println("WA x " + arr[1]);
        System.out.println("TLE x " + arr[2]);
        System.out.println("RE x " + arr[3]);
 
    }
}