import java.util.*;
class Main{
    public static void main(String[]args){
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        String[] S = new String [N+1];
        int [] C = {0,0,0,0};
        for(int i=0;i<N+1;i++){
            S[i] = scan.nextLine();
        }
        for(int i=0;i<N+1;i++){
            switch(S[i]){
                case "AC":
                    C[0] += 1;
                    break;
                case "WA":
                    C[1] += 1;
                    break;
                case "TLE":
                    C[2] += 1;
                    break;
                case "RE":
                    C[3] += 1;
                    break;
                default:
            }
        }
        System.out.println("AC x " + C[0] + "\n" + "WA x " + C[1] + "\n" + "TLE x " + C[2] + "\n" + "RE x " + C[3]);

        scan.close();
    }
} import java.util.*; util.* java class Main{
    public static void main(String[]args){
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        String[] S = new String [N+1];
        int [] C = {0,0,0,0};
        for(int i=0;i<N+1;i++){
            S[i] = scan.nextLine();
        }
        for(int i=0;i<N+1;i++){
            switch(S[i]){
                case "AC":
                    C[0] += 1;
                    break;
                case "WA":
                    C[1] += 1;
                    break;
                case "TLE":
                    C[2] += 1;
                    break;
                case "RE":
                    C[3] += 1;
                    break;
                default:
            }
        }
        System.out.println("AC x " + C[0] + "\n" + "WA x " + C[1] + "\n" + "TLE x " + C[2] + "\n" + "RE x " + C[3]);

        scan.close();
    }
} Main public static void main(String[]args){
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        String[] S = new String [N+1];
        int [] C = {0,0,0,0};
        for(int i=0;i<N+1;i++){
            S[i] = scan.nextLine();
        }
        for(int i=0;i<N+1;i++){
            switch(S[i]){
                case "AC":
                    C[0] += 1;
                    break;
                case "WA":
                    C[1] += 1;
                    break;
                case "TLE":
                    C[2] += 1;
                    break;
                case "RE":
                    C[3] += 1;
                    break;
                default:
            }
        }
        System.out.println("AC x " + C[0] + "\n" + "WA x " + C[1] + "\n" + "TLE x " + C[2] + "\n" + "RE x " + C[3]);

        scan.close();
    } main {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        String[] S = new String [N+1];
        int [] C = {0,0,0,0};
        for(int i=0;i<N+1;i++){
            S[i] = scan.nextLine();
        }
        for(int i=0;i<N+1;i++){
            switch(S[i]){
                case "AC":
                    C[0] += 1;
                    break;
                case "WA":
                    C[1] += 1;
                    break;
                case "TLE":
                    C[2] += 1;
                    break;
                case "RE":
                    C[3] += 1;
                    break;
                default:
            }
        }
        System.out.println("AC x " + C[0] + "\n" + "WA x " + C[1] + "\n" + "TLE x " + C[2] + "\n" + "RE x " + C[3]);

        scan.close();
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan String[] S = new String [N+1]; S new String [N+1] N+1 N 1 int [] C = {0,0,0,0}; C {0,0,0,0} 0 0 0 0 for(int i=0;i<N+1;i++){
            S[i] = scan.nextLine();
        } int i=0; int i=0; i 0 i<N+1 i N+1 N 1 i++ i++ i {
            S[i] = scan.nextLine();
        } {
            S[i] = scan.nextLine();
        } S[i] = scan.nextLine() S[i] S i scan.nextLine() scan.nextLine scan for(int i=0;i<N+1;i++){
            switch(S[i]){
                case "AC":
                    C[0] += 1;
                    break;
                case "WA":
                    C[1] += 1;
                    break;
                case "TLE":
                    C[2] += 1;
                    break;
                case "RE":
                    C[3] += 1;
                    break;
                default:
            }
        } int i=0; int i=0; i 0 i<N+1 i N+1 N 1 i++ i++ i {
            switch(S[i]){
                case "AC":
                    C[0] += 1;
                    break;
                case "WA":
                    C[1] += 1;
                    break;
                case "TLE":
                    C[2] += 1;
                    break;
                case "RE":
                    C[3] += 1;
                    break;
                default:
            }
        } {
            switch(S[i]){
                case "AC":
                    C[0] += 1;
                    break;
                case "WA":
                    C[1] += 1;
                    break;
                case "TLE":
                    C[2] += 1;
                    break;
                case "RE":
                    C[3] += 1;
                    break;
                default:
            }
        } switch(S[i]){
                case "AC":
                    C[0] += 1;
                    break;
                case "WA":
                    C[1] += 1;
                    break;
                case "TLE":
                    C[2] += 1;
                    break;
                case "RE":
                    C[3] += 1;
                    break;
                default:
            } S[i] S i case "AC": "AC" case "AC": C[0] += 1 C[0] C 0 1 break; case "WA": "WA" case "WA": C[1] += 1 C[1] C 1 1 break; case "TLE": "TLE" case "TLE": C[2] += 1 C[2] C 2 1 break; case "RE": "RE" case "RE": C[3] += 1 C[3] C 3 1 break; default: default: System.out.println("AC x " + C[0] + "\n" + "WA x " + C[1] + "\n" + "TLE x " + C[2] + "\n" + "RE x " + C[3]) System.out.println System.out System System.out "AC x " + C[0] + "\n" + "WA x " + C[1] + "\n" + "TLE x " + C[2] + "\n" + "RE x " + C[3] "RE x " "\n" C[2] "TLE x " "\n" C[1] "WA x " "\n" "AC x " + C[0] + "\n" + "WA x " + C[1] + "\n" + "TLE x " + C[2] + "\n" + "RE x " + C[3] "AC x " C[0] C 0 "\n" "WA x " C[1] C 1 "\n" "TLE x " C[2] C 2 "\n" "RE x " C[3] C 3 scan.close() scan.close scan String[]args args
import java.util.*;
class Main{
    public static void main(String[]args){
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        String[] S = new String [N+1];
        int [] C = {0,0,0,0};
        for(int i=0;i<N+1;i++){
            S[i] = scan.nextLine();
        }
        for(int i=0;i<N+1;i++){
            switch(S[i]){
                case "AC":
                    C[0] += 1;
                    break;
                case "WA":
                    C[1] += 1;
                    break;
                case "TLE":
                    C[2] += 1;
                    break;
                case "RE":
                    C[3] += 1;
                    break;
                default:
            }
        }
        System.out.println("AC x " + C[0] + "\n" + "WA x " + C[1] + "\n" + "TLE x " + C[2] + "\n" + "RE x " + C[3]);

        scan.close();
    }
}
