import java.util.Scanner; 

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

        int N = sc.nextInt();
        int a = 0, b = 0, c = 0, d = 0;

        for(int i = 0; i<N ;i++){
            String e = sc.next();
            if(e.equals("AC")) a++;
            if(e.equals("WA")) b++;
            if(e.equals("TLE")) c++;
            if(e.equals("RE")) d++;
        }

        System.out.println("AC x "+a);
        System.out.println("WA x "+b);
        System.out.println("TLE x "+c);
        System.out.println("RE x "+d);       

    }
} 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();
        int a = 0, b = 0, c = 0, d = 0;

        for(int i = 0; i<N ;i++){
            String e = sc.next();
            if(e.equals("AC")) a++;
            if(e.equals("WA")) b++;
            if(e.equals("TLE")) c++;
            if(e.equals("RE")) d++;
        }

        System.out.println("AC x "+a);
        System.out.println("WA x "+b);
        System.out.println("TLE x "+c);
        System.out.println("RE x "+d);       

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

        int N = sc.nextInt();
        int a = 0, b = 0, c = 0, d = 0;

        for(int i = 0; i<N ;i++){
            String e = sc.next();
            if(e.equals("AC")) a++;
            if(e.equals("WA")) b++;
            if(e.equals("TLE")) c++;
            if(e.equals("RE")) d++;
        }

        System.out.println("AC x "+a);
        System.out.println("WA x "+b);
        System.out.println("TLE x "+c);
        System.out.println("RE x "+d);       

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

        int N = sc.nextInt();
        int a = 0, b = 0, c = 0, d = 0;

        for(int i = 0; i<N ;i++){
            String e = sc.next();
            if(e.equals("AC")) a++;
            if(e.equals("WA")) b++;
            if(e.equals("TLE")) c++;
            if(e.equals("RE")) d++;
        }

        System.out.println("AC x "+a);
        System.out.println("WA x "+b);
        System.out.println("TLE x "+c);
        System.out.println("RE x "+d);       

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int a = 0 a 0 b = 0 b 0 c = 0 c 0 d = 0; d 0 for(int i = 0; i<N ;i++){
            String e = sc.next();
            if(e.equals("AC")) a++;
            if(e.equals("WA")) b++;
            if(e.equals("TLE")) c++;
            if(e.equals("RE")) d++;
        } int i = 0; int i = 0; i 0 i<N i N i++ i++ i {
            String e = sc.next();
            if(e.equals("AC")) a++;
            if(e.equals("WA")) b++;
            if(e.equals("TLE")) c++;
            if(e.equals("RE")) d++;
        } {
            String e = sc.next();
            if(e.equals("AC")) a++;
            if(e.equals("WA")) b++;
            if(e.equals("TLE")) c++;
            if(e.equals("RE")) d++;
        } String e = sc.next(); e sc.next() sc.next sc if(e.equals("AC")) a++; e.equals("AC") e.equals e "AC" a++ a if(e.equals("WA")) b++; e.equals("WA") e.equals e "WA" b++ b if(e.equals("TLE")) c++; e.equals("TLE") e.equals e "TLE" c++ c if(e.equals("RE")) d++; e.equals("RE") e.equals e "RE" d++ d System.out.println("AC x "+a) System.out.println System.out System System.out "AC x "+a "AC x " a System.out.println("WA x "+b) System.out.println System.out System System.out "WA x "+b "WA x " b System.out.println("TLE x "+c) System.out.println System.out System System.out "TLE x "+c "TLE x " c System.out.println("RE x "+d) System.out.println System.out System System.out "RE x "+d "RE x " d String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int a = 0, b = 0, c = 0, d = 0;

        for(int i = 0; i<N ;i++){
            String e = sc.next();
            if(e.equals("AC")) a++;
            if(e.equals("WA")) b++;
            if(e.equals("TLE")) c++;
            if(e.equals("RE")) d++;
        }

        System.out.println("AC x "+a);
        System.out.println("WA x "+b);
        System.out.println("TLE x "+c);
        System.out.println("RE x "+d);       

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

        int N = sc.nextInt();
        int a = 0, b = 0, c = 0, d = 0;

        for(int i = 0; i<N ;i++){
            String e = sc.next();
            if(e.equals("AC")) a++;
            if(e.equals("WA")) b++;
            if(e.equals("TLE")) c++;
            if(e.equals("RE")) d++;
        }

        System.out.println("AC x "+a);
        System.out.println("WA x "+b);
        System.out.println("TLE x "+c);
        System.out.println("RE x "+d);       

    }
} Main
import java.util.Scanner; 

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

        int N = sc.nextInt();
        int a = 0, b = 0, c = 0, d = 0;

        for(int i = 0; i<N ;i++){
            String e = sc.next();
            if(e.equals("AC")) a++;
            if(e.equals("WA")) b++;
            if(e.equals("TLE")) c++;
            if(e.equals("RE")) d++;
        }

        System.out.println("AC x "+a);
        System.out.println("WA x "+b);
        System.out.println("TLE x "+c);
        System.out.println("RE x "+d);       

    }
}