import java.util.*;
class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int a = 0, b = 0, c = 0,d = 0;
        for(int i = 1; i <= n; i++) {
            String x = in.next();
            if(x.equals("AC")) a++;
            if(x.equals("TLE")) c++;
            if(x.equals("WA")) b++;
            if(x.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);
        in.close();
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int a = 0, b = 0, c = 0,d = 0;
        for(int i = 1; i <= n; i++) {
            String x = in.next();
            if(x.equals("AC")) a++;
            if(x.equals("TLE")) c++;
            if(x.equals("WA")) b++;
            if(x.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);
        in.close();
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int a = 0, b = 0, c = 0,d = 0;
        for(int i = 1; i <= n; i++) {
            String x = in.next();
            if(x.equals("AC")) a++;
            if(x.equals("TLE")) c++;
            if(x.equals("WA")) b++;
            if(x.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);
        in.close();
    } main {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int a = 0, b = 0, c = 0,d = 0;
        for(int i = 1; i <= n; i++) {
            String x = in.next();
            if(x.equals("AC")) a++;
            if(x.equals("TLE")) c++;
            if(x.equals("WA")) b++;
            if(x.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);
        in.close();
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in int a = 0 a 0 b = 0 b 0 c = 0 c 0 d = 0; d 0 for(int i = 1; i <= n; i++) {
            String x = in.next();
            if(x.equals("AC")) a++;
            if(x.equals("TLE")) c++;
            if(x.equals("WA")) b++;
            if(x.equals("RE")) d++;
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            String x = in.next();
            if(x.equals("AC")) a++;
            if(x.equals("TLE")) c++;
            if(x.equals("WA")) b++;
            if(x.equals("RE")) d++;
        } {
            String x = in.next();
            if(x.equals("AC")) a++;
            if(x.equals("TLE")) c++;
            if(x.equals("WA")) b++;
            if(x.equals("RE")) d++;
        } String x = in.next(); x in.next() in.next in if(x.equals("AC")) a++; x.equals("AC") x.equals x "AC" a++ a if(x.equals("TLE")) c++; x.equals("TLE") x.equals x "TLE" c++ c if(x.equals("WA")) b++; x.equals("WA") x.equals x "WA" b++ b if(x.equals("RE")) d++; x.equals("RE") x.equals x "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 in.close() in.close in String[] args args
import java.util.*;
class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int a = 0, b = 0, c = 0,d = 0;
        for(int i = 1; i <= n; i++) {
            String x = in.next();
            if(x.equals("AC")) a++;
            if(x.equals("TLE")) c++;
            if(x.equals("WA")) b++;
            if(x.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);
        in.close();
    }
}