import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] res = new String[N];
        int ac = 0, wa = 0, tle = 0, re = 0;
        for(int i=0; i<N; i++){
            res[i] = sc.next();
            if(res[i].equals("AC")){
                ac++;
            }else if (res[i].equals("WA")){
                wa++;
            }else if(res[i].equals("TLE")){
                tle++;
            }else{
                re++;
            }
        }
        System.out.println("AC x "+ac+"\nWA x "+wa+"\nTLE x "+tle+"\nRE x "+re);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] res = new String[N];
        int ac = 0, wa = 0, tle = 0, re = 0;
        for(int i=0; i<N; i++){
            res[i] = sc.next();
            if(res[i].equals("AC")){
                ac++;
            }else if (res[i].equals("WA")){
                wa++;
            }else if(res[i].equals("TLE")){
                tle++;
            }else{
                re++;
            }
        }
        System.out.println("AC x "+ac+"\nWA x "+wa+"\nTLE x "+tle+"\nRE x "+re);
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] res = new String[N];
        int ac = 0, wa = 0, tle = 0, re = 0;
        for(int i=0; i<N; i++){
            res[i] = sc.next();
            if(res[i].equals("AC")){
                ac++;
            }else if (res[i].equals("WA")){
                wa++;
            }else if(res[i].equals("TLE")){
                tle++;
            }else{
                re++;
            }
        }
        System.out.println("AC x "+ac+"\nWA x "+wa+"\nTLE x "+tle+"\nRE x "+re);
    } main {
        // Your code here!
        
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] res = new String[N];
        int ac = 0, wa = 0, tle = 0, re = 0;
        for(int i=0; i<N; i++){
            res[i] = sc.next();
            if(res[i].equals("AC")){
                ac++;
            }else if (res[i].equals("WA")){
                wa++;
            }else if(res[i].equals("TLE")){
                tle++;
            }else{
                re++;
            }
        }
        System.out.println("AC x "+ac+"\nWA x "+wa+"\nTLE x "+tle+"\nRE x "+re);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc String[] res = new String[N]; res new String[N] N int ac = 0 ac 0 wa = 0 wa 0 tle = 0 tle 0 re = 0; re 0 for(int i=0; i<N; i++){
            res[i] = sc.next();
            if(res[i].equals("AC")){
                ac++;
            }else if (res[i].equals("WA")){
                wa++;
            }else if(res[i].equals("TLE")){
                tle++;
            }else{
                re++;
            }
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            res[i] = sc.next();
            if(res[i].equals("AC")){
                ac++;
            }else if (res[i].equals("WA")){
                wa++;
            }else if(res[i].equals("TLE")){
                tle++;
            }else{
                re++;
            }
        } {
            res[i] = sc.next();
            if(res[i].equals("AC")){
                ac++;
            }else if (res[i].equals("WA")){
                wa++;
            }else if(res[i].equals("TLE")){
                tle++;
            }else{
                re++;
            }
        } res[i] = sc.next() res[i] res i sc.next() sc.next sc if(res[i].equals("AC")){
                ac++;
            }else if (res[i].equals("WA")){
                wa++;
            }else if(res[i].equals("TLE")){
                tle++;
            }else{
                re++;
            } res[i].equals("AC") res[i].equals res[i] res i "AC" {
                ac++;
            } ac++ ac if (res[i].equals("WA")){
                wa++;
            }else if(res[i].equals("TLE")){
                tle++;
            }else{
                re++;
            } res[i].equals("WA") res[i].equals res[i] res i "WA" {
                wa++;
            } wa++ wa if(res[i].equals("TLE")){
                tle++;
            }else{
                re++;
            } res[i].equals("TLE") res[i].equals res[i] res i "TLE" {
                tle++;
            } tle++ tle {
                re++;
            } re++ re System.out.println("AC x "+ac+"\nWA x "+wa+"\nTLE x "+tle+"\nRE x "+re) System.out.println System.out System System.out "AC x "+ac+"\nWA x "+wa+"\nTLE x "+tle+"\nRE x "+re "\nRE x " tle "\nTLE x " wa "\nWA x " "AC x "+ac+"\nWA x "+wa+"\nTLE x "+tle+"\nRE x "+re "AC x " ac "\nWA x " wa "\nTLE x " tle "\nRE x " re String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] res = new String[N];
        int ac = 0, wa = 0, tle = 0, re = 0;
        for(int i=0; i<N; i++){
            res[i] = sc.next();
            if(res[i].equals("AC")){
                ac++;
            }else if (res[i].equals("WA")){
                wa++;
            }else if(res[i].equals("TLE")){
                tle++;
            }else{
                re++;
            }
        }
        System.out.println("AC x "+ac+"\nWA x "+wa+"\nTLE x "+tle+"\nRE x "+re);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] res = new String[N];
        int ac = 0, wa = 0, tle = 0, re = 0;
        for(int i=0; i<N; i++){
            res[i] = sc.next();
            if(res[i].equals("AC")){
                ac++;
            }else if (res[i].equals("WA")){
                wa++;
            }else if(res[i].equals("TLE")){
                tle++;
            }else{
                re++;
            }
        }
        System.out.println("AC x "+ac+"\nWA x "+wa+"\nTLE x "+tle+"\nRE x "+re);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String[] res = new String[N];
        int ac = 0, wa = 0, tle = 0, re = 0;
        for(int i=0; i<N; i++){
            res[i] = sc.next();
            if(res[i].equals("AC")){
                ac++;
            }else if (res[i].equals("WA")){
                wa++;
            }else if(res[i].equals("TLE")){
                tle++;
            }else{
                re++;
            }
        }
        System.out.println("AC x "+ac+"\nWA x "+wa+"\nTLE x "+tle+"\nRE x "+re);
    }
}