import java.util.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        n++;
        int count = 0;
        int count1 = 0;
        int count2 = 0;
        int count3 = 0;
        while(n-->0){
            String s = sc.nextLine();
            if(s.contains("AC")){
                count++;
            }
            else if(s.contains("WA")){
                count1++;
            }
            else if(s.contains("TLE")){
                count2++;
            }
            else if(s.contains("RE")){
                count3++;
            }

        }
        System.out.println("AC" + " x " + count);
        System.out.println("WA" + " x " + count1);
        System.out.println("TLE" + " x " + count2);
        System.out.println("RE" + " x " + count3);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        n++;
        int count = 0;
        int count1 = 0;
        int count2 = 0;
        int count3 = 0;
        while(n-->0){
            String s = sc.nextLine();
            if(s.contains("AC")){
                count++;
            }
            else if(s.contains("WA")){
                count1++;
            }
            else if(s.contains("TLE")){
                count2++;
            }
            else if(s.contains("RE")){
                count3++;
            }

        }
        System.out.println("AC" + " x " + count);
        System.out.println("WA" + " x " + count1);
        System.out.println("TLE" + " x " + count2);
        System.out.println("RE" + " x " + count3);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        n++;
        int count = 0;
        int count1 = 0;
        int count2 = 0;
        int count3 = 0;
        while(n-->0){
            String s = sc.nextLine();
            if(s.contains("AC")){
                count++;
            }
            else if(s.contains("WA")){
                count1++;
            }
            else if(s.contains("TLE")){
                count2++;
            }
            else if(s.contains("RE")){
                count3++;
            }

        }
        System.out.println("AC" + " x " + count);
        System.out.println("WA" + " x " + count1);
        System.out.println("TLE" + " x " + count2);
        System.out.println("RE" + " x " + count3);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        n++;
        int count = 0;
        int count1 = 0;
        int count2 = 0;
        int count3 = 0;
        while(n-->0){
            String s = sc.nextLine();
            if(s.contains("AC")){
                count++;
            }
            else if(s.contains("WA")){
                count1++;
            }
            else if(s.contains("TLE")){
                count2++;
            }
            else if(s.contains("RE")){
                count3++;
            }

        }
        System.out.println("AC" + " x " + count);
        System.out.println("WA" + " x " + count1);
        System.out.println("TLE" + " x " + count2);
        System.out.println("RE" + " x " + count3);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc n++ n int count = 0; count 0 int count1 = 0; count1 0 int count2 = 0; count2 0 int count3 = 0; count3 0 while(n-->0){
            String s = sc.nextLine();
            if(s.contains("AC")){
                count++;
            }
            else if(s.contains("WA")){
                count1++;
            }
            else if(s.contains("TLE")){
                count2++;
            }
            else if(s.contains("RE")){
                count3++;
            }

        } n-->0 n-- n 0 {
            String s = sc.nextLine();
            if(s.contains("AC")){
                count++;
            }
            else if(s.contains("WA")){
                count1++;
            }
            else if(s.contains("TLE")){
                count2++;
            }
            else if(s.contains("RE")){
                count3++;
            }

        } String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc if(s.contains("AC")){
                count++;
            }
            else if(s.contains("WA")){
                count1++;
            }
            else if(s.contains("TLE")){
                count2++;
            }
            else if(s.contains("RE")){
                count3++;
            } s.contains("AC") s.contains s "AC" {
                count++;
            } count++ count if(s.contains("WA")){
                count1++;
            }
            else if(s.contains("TLE")){
                count2++;
            }
            else if(s.contains("RE")){
                count3++;
            } s.contains("WA") s.contains s "WA" {
                count1++;
            } count1++ count1 if(s.contains("TLE")){
                count2++;
            }
            else if(s.contains("RE")){
                count3++;
            } s.contains("TLE") s.contains s "TLE" {
                count2++;
            } count2++ count2 if(s.contains("RE")){
                count3++;
            } s.contains("RE") s.contains s "RE" {
                count3++;
            } count3++ count3 System.out.println("AC" + " x " + count) System.out.println System.out System System.out "AC" + " x " + count "AC" + " x " + count "AC" " x " count System.out.println("WA" + " x " + count1) System.out.println System.out System System.out "WA" + " x " + count1 "WA" + " x " + count1 "WA" " x " count1 System.out.println("TLE" + " x " + count2) System.out.println System.out System System.out "TLE" + " x " + count2 "TLE" + " x " + count2 "TLE" " x " count2 System.out.println("RE" + " x " + count3) System.out.println System.out System System.out "RE" + " x " + count3 "RE" + " x " + count3 "RE" " x " count3 String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        n++;
        int count = 0;
        int count1 = 0;
        int count2 = 0;
        int count3 = 0;
        while(n-->0){
            String s = sc.nextLine();
            if(s.contains("AC")){
                count++;
            }
            else if(s.contains("WA")){
                count1++;
            }
            else if(s.contains("TLE")){
                count2++;
            }
            else if(s.contains("RE")){
                count3++;
            }

        }
        System.out.println("AC" + " x " + count);
        System.out.println("WA" + " x " + count1);
        System.out.println("TLE" + " x " + count2);
        System.out.println("RE" + " x " + count3);
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        n++;
        int count = 0;
        int count1 = 0;
        int count2 = 0;
        int count3 = 0;
        while(n-->0){
            String s = sc.nextLine();
            if(s.contains("AC")){
                count++;
            }
            else if(s.contains("WA")){
                count1++;
            }
            else if(s.contains("TLE")){
                count2++;
            }
            else if(s.contains("RE")){
                count3++;
            }

        }
        System.out.println("AC" + " x " + count);
        System.out.println("WA" + " x " + count1);
        System.out.println("TLE" + " x " + count2);
        System.out.println("RE" + " x " + count3);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        n++;
        int count = 0;
        int count1 = 0;
        int count2 = 0;
        int count3 = 0;
        while(n-->0){
            String s = sc.nextLine();
            if(s.contains("AC")){
                count++;
            }
            else if(s.contains("WA")){
                count1++;
            }
            else if(s.contains("TLE")){
                count2++;
            }
            else if(s.contains("RE")){
                count3++;
            }

        }
        System.out.println("AC" + " x " + count);
        System.out.println("WA" + " x " + count1);
        System.out.println("TLE" + " x " + count2);
        System.out.println("RE" + " x " + count3);
    }
}