import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String[] str = new String[n];
        for(int i = 0; i<n; i++){
            str[i] = sc.next();
        }

        int acCount = 0;
        int waCount = 0;
        int tleCount = 0;
        int reCount = 0;

        for(int j = 0; j<n; j++){
            if(str[j].equals("AC")){
                acCount++;
            }
            else if(str[j].equals("WA")){
                waCount++;
            }
            else if(str[j].equals("TLE")){
                tleCount++;
            }
            else if(str[j].equals("RE")){
                reCount++;
            }
        }
        System.out.printf("AC x %d\n", acCount);
        System.out.printf("WA x %d\n", waCount);
        System.out.printf("TLE x %d\n", tleCount);
        System.out.printf("RE x %d\n", reCount);



    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String[] str = new String[n];
        for(int i = 0; i<n; i++){
            str[i] = sc.next();
        }

        int acCount = 0;
        int waCount = 0;
        int tleCount = 0;
        int reCount = 0;

        for(int j = 0; j<n; j++){
            if(str[j].equals("AC")){
                acCount++;
            }
            else if(str[j].equals("WA")){
                waCount++;
            }
            else if(str[j].equals("TLE")){
                tleCount++;
            }
            else if(str[j].equals("RE")){
                reCount++;
            }
        }
        System.out.printf("AC x %d\n", acCount);
        System.out.printf("WA x %d\n", waCount);
        System.out.printf("TLE x %d\n", tleCount);
        System.out.printf("RE x %d\n", reCount);



    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String[] str = new String[n];
        for(int i = 0; i<n; i++){
            str[i] = sc.next();
        }

        int acCount = 0;
        int waCount = 0;
        int tleCount = 0;
        int reCount = 0;

        for(int j = 0; j<n; j++){
            if(str[j].equals("AC")){
                acCount++;
            }
            else if(str[j].equals("WA")){
                waCount++;
            }
            else if(str[j].equals("TLE")){
                tleCount++;
            }
            else if(str[j].equals("RE")){
                reCount++;
            }
        }
        System.out.printf("AC x %d\n", acCount);
        System.out.printf("WA x %d\n", waCount);
        System.out.printf("TLE x %d\n", tleCount);
        System.out.printf("RE x %d\n", reCount);



    } main {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String[] str = new String[n];
        for(int i = 0; i<n; i++){
            str[i] = sc.next();
        }

        int acCount = 0;
        int waCount = 0;
        int tleCount = 0;
        int reCount = 0;

        for(int j = 0; j<n; j++){
            if(str[j].equals("AC")){
                acCount++;
            }
            else if(str[j].equals("WA")){
                waCount++;
            }
            else if(str[j].equals("TLE")){
                tleCount++;
            }
            else if(str[j].equals("RE")){
                reCount++;
            }
        }
        System.out.printf("AC x %d\n", acCount);
        System.out.printf("WA x %d\n", waCount);
        System.out.printf("TLE x %d\n", tleCount);
        System.out.printf("RE x %d\n", reCount);



    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String[] str = new String[n]; str new String[n] n for(int i = 0; i<n; i++){
            str[i] = sc.next();
        } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
            str[i] = sc.next();
        } {
            str[i] = sc.next();
        } str[i] = sc.next() str[i] str i sc.next() sc.next sc int acCount = 0; acCount 0 int waCount = 0; waCount 0 int tleCount = 0; tleCount 0 int reCount = 0; reCount 0 for(int j = 0; j<n; j++){
            if(str[j].equals("AC")){
                acCount++;
            }
            else if(str[j].equals("WA")){
                waCount++;
            }
            else if(str[j].equals("TLE")){
                tleCount++;
            }
            else if(str[j].equals("RE")){
                reCount++;
            }
        } int j = 0; int j = 0; j 0 j<n j n j++ j++ j {
            if(str[j].equals("AC")){
                acCount++;
            }
            else if(str[j].equals("WA")){
                waCount++;
            }
            else if(str[j].equals("TLE")){
                tleCount++;
            }
            else if(str[j].equals("RE")){
                reCount++;
            }
        } {
            if(str[j].equals("AC")){
                acCount++;
            }
            else if(str[j].equals("WA")){
                waCount++;
            }
            else if(str[j].equals("TLE")){
                tleCount++;
            }
            else if(str[j].equals("RE")){
                reCount++;
            }
        } if(str[j].equals("AC")){
                acCount++;
            }
            else if(str[j].equals("WA")){
                waCount++;
            }
            else if(str[j].equals("TLE")){
                tleCount++;
            }
            else if(str[j].equals("RE")){
                reCount++;
            } str[j].equals("AC") str[j].equals str[j] str j "AC" {
                acCount++;
            } acCount++ acCount if(str[j].equals("WA")){
                waCount++;
            }
            else if(str[j].equals("TLE")){
                tleCount++;
            }
            else if(str[j].equals("RE")){
                reCount++;
            } str[j].equals("WA") str[j].equals str[j] str j "WA" {
                waCount++;
            } waCount++ waCount if(str[j].equals("TLE")){
                tleCount++;
            }
            else if(str[j].equals("RE")){
                reCount++;
            } str[j].equals("TLE") str[j].equals str[j] str j "TLE" {
                tleCount++;
            } tleCount++ tleCount if(str[j].equals("RE")){
                reCount++;
            } str[j].equals("RE") str[j].equals str[j] str j "RE" {
                reCount++;
            } reCount++ reCount System.out.printf("AC x %d\n", acCount) System.out.printf System.out System System.out "AC x %d\n" acCount System.out.printf("WA x %d\n", waCount) System.out.printf System.out System System.out "WA x %d\n" waCount System.out.printf("TLE x %d\n", tleCount) System.out.printf System.out System System.out "TLE x %d\n" tleCount System.out.printf("RE x %d\n", reCount) System.out.printf System.out System System.out "RE x %d\n" reCount String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String[] str = new String[n];
        for(int i = 0; i<n; i++){
            str[i] = sc.next();
        }

        int acCount = 0;
        int waCount = 0;
        int tleCount = 0;
        int reCount = 0;

        for(int j = 0; j<n; j++){
            if(str[j].equals("AC")){
                acCount++;
            }
            else if(str[j].equals("WA")){
                waCount++;
            }
            else if(str[j].equals("TLE")){
                tleCount++;
            }
            else if(str[j].equals("RE")){
                reCount++;
            }
        }
        System.out.printf("AC x %d\n", acCount);
        System.out.printf("WA x %d\n", waCount);
        System.out.printf("TLE x %d\n", tleCount);
        System.out.printf("RE x %d\n", reCount);



    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String[] str = new String[n];
        for(int i = 0; i<n; i++){
            str[i] = sc.next();
        }

        int acCount = 0;
        int waCount = 0;
        int tleCount = 0;
        int reCount = 0;

        for(int j = 0; j<n; j++){
            if(str[j].equals("AC")){
                acCount++;
            }
            else if(str[j].equals("WA")){
                waCount++;
            }
            else if(str[j].equals("TLE")){
                tleCount++;
            }
            else if(str[j].equals("RE")){
                reCount++;
            }
        }
        System.out.printf("AC x %d\n", acCount);
        System.out.printf("WA x %d\n", waCount);
        System.out.printf("TLE x %d\n", tleCount);
        System.out.printf("RE x %d\n", reCount);



    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String[] str = new String[n];
        for(int i = 0; i<n; i++){
            str[i] = sc.next();
        }

        int acCount = 0;
        int waCount = 0;
        int tleCount = 0;
        int reCount = 0;

        for(int j = 0; j<n; j++){
            if(str[j].equals("AC")){
                acCount++;
            }
            else if(str[j].equals("WA")){
                waCount++;
            }
            else if(str[j].equals("TLE")){
                tleCount++;
            }
            else if(str[j].equals("RE")){
                reCount++;
            }
        }
        System.out.printf("AC x %d\n", acCount);
        System.out.printf("WA x %d\n", waCount);
        System.out.printf("TLE x %d\n", tleCount);
        System.out.printf("RE x %d\n", reCount);



    }
}