import java.util.*;
 
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] cnt = new int[4];
        
        for(int i=0; i<N; i++){
            String str = sc.next();
            if(str.equals("AC")){
                cnt[0]++;
            }else if(str.equals("WA")){
                cnt[1]++;
            }else if(str.equals("TLE")){
                cnt[2]++;
            }else if(str.equals("RE")){
                cnt[3]++;
            }
        }
        System.out.println("AC x "+cnt[0]);
        System.out.println("WA x "+cnt[1]);
        System.out.println("TLE x "+cnt[2]);
        System.out.println("RE x "+cnt[3]);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] cnt = new int[4];
        
        for(int i=0; i<N; i++){
            String str = sc.next();
            if(str.equals("AC")){
                cnt[0]++;
            }else if(str.equals("WA")){
                cnt[1]++;
            }else if(str.equals("TLE")){
                cnt[2]++;
            }else if(str.equals("RE")){
                cnt[3]++;
            }
        }
        System.out.println("AC x "+cnt[0]);
        System.out.println("WA x "+cnt[1]);
        System.out.println("TLE x "+cnt[2]);
        System.out.println("RE x "+cnt[3]);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] cnt = new int[4];
        
        for(int i=0; i<N; i++){
            String str = sc.next();
            if(str.equals("AC")){
                cnt[0]++;
            }else if(str.equals("WA")){
                cnt[1]++;
            }else if(str.equals("TLE")){
                cnt[2]++;
            }else if(str.equals("RE")){
                cnt[3]++;
            }
        }
        System.out.println("AC x "+cnt[0]);
        System.out.println("WA x "+cnt[1]);
        System.out.println("TLE x "+cnt[2]);
        System.out.println("RE x "+cnt[3]);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] cnt = new int[4];
        
        for(int i=0; i<N; i++){
            String str = sc.next();
            if(str.equals("AC")){
                cnt[0]++;
            }else if(str.equals("WA")){
                cnt[1]++;
            }else if(str.equals("TLE")){
                cnt[2]++;
            }else if(str.equals("RE")){
                cnt[3]++;
            }
        }
        System.out.println("AC x "+cnt[0]);
        System.out.println("WA x "+cnt[1]);
        System.out.println("TLE x "+cnt[2]);
        System.out.println("RE x "+cnt[3]);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] cnt = new int[4]; cnt new int[4] 4 for(int i=0; i<N; i++){
            String str = sc.next();
            if(str.equals("AC")){
                cnt[0]++;
            }else if(str.equals("WA")){
                cnt[1]++;
            }else if(str.equals("TLE")){
                cnt[2]++;
            }else if(str.equals("RE")){
                cnt[3]++;
            }
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            String str = sc.next();
            if(str.equals("AC")){
                cnt[0]++;
            }else if(str.equals("WA")){
                cnt[1]++;
            }else if(str.equals("TLE")){
                cnt[2]++;
            }else if(str.equals("RE")){
                cnt[3]++;
            }
        } {
            String str = sc.next();
            if(str.equals("AC")){
                cnt[0]++;
            }else if(str.equals("WA")){
                cnt[1]++;
            }else if(str.equals("TLE")){
                cnt[2]++;
            }else if(str.equals("RE")){
                cnt[3]++;
            }
        } String str = sc.next(); str sc.next() sc.next sc if(str.equals("AC")){
                cnt[0]++;
            }else if(str.equals("WA")){
                cnt[1]++;
            }else if(str.equals("TLE")){
                cnt[2]++;
            }else if(str.equals("RE")){
                cnt[3]++;
            } str.equals("AC") str.equals str "AC" {
                cnt[0]++;
            } cnt[0]++ cnt[0] cnt 0 if(str.equals("WA")){
                cnt[1]++;
            }else if(str.equals("TLE")){
                cnt[2]++;
            }else if(str.equals("RE")){
                cnt[3]++;
            } str.equals("WA") str.equals str "WA" {
                cnt[1]++;
            } cnt[1]++ cnt[1] cnt 1 if(str.equals("TLE")){
                cnt[2]++;
            }else if(str.equals("RE")){
                cnt[3]++;
            } str.equals("TLE") str.equals str "TLE" {
                cnt[2]++;
            } cnt[2]++ cnt[2] cnt 2 if(str.equals("RE")){
                cnt[3]++;
            } str.equals("RE") str.equals str "RE" {
                cnt[3]++;
            } cnt[3]++ cnt[3] cnt 3 System.out.println("AC x "+cnt[0]) System.out.println System.out System System.out "AC x "+cnt[0] "AC x " cnt[0] cnt 0 System.out.println("WA x "+cnt[1]) System.out.println System.out System System.out "WA x "+cnt[1] "WA x " cnt[1] cnt 1 System.out.println("TLE x "+cnt[2]) System.out.println System.out System System.out "TLE x "+cnt[2] "TLE x " cnt[2] cnt 2 System.out.println("RE x "+cnt[3]) System.out.println System.out System System.out "RE x "+cnt[3] "RE x " cnt[3] cnt 3 String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] cnt = new int[4];
        
        for(int i=0; i<N; i++){
            String str = sc.next();
            if(str.equals("AC")){
                cnt[0]++;
            }else if(str.equals("WA")){
                cnt[1]++;
            }else if(str.equals("TLE")){
                cnt[2]++;
            }else if(str.equals("RE")){
                cnt[3]++;
            }
        }
        System.out.println("AC x "+cnt[0]);
        System.out.println("WA x "+cnt[1]);
        System.out.println("TLE x "+cnt[2]);
        System.out.println("RE x "+cnt[3]);
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] cnt = new int[4];
        
        for(int i=0; i<N; i++){
            String str = sc.next();
            if(str.equals("AC")){
                cnt[0]++;
            }else if(str.equals("WA")){
                cnt[1]++;
            }else if(str.equals("TLE")){
                cnt[2]++;
            }else if(str.equals("RE")){
                cnt[3]++;
            }
        }
        System.out.println("AC x "+cnt[0]);
        System.out.println("WA x "+cnt[1]);
        System.out.println("TLE x "+cnt[2]);
        System.out.println("RE x "+cnt[3]);
    }
} Main
import java.util.*;
 
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] cnt = new int[4];
        
        for(int i=0; i<N; i++){
            String str = sc.next();
            if(str.equals("AC")){
                cnt[0]++;
            }else if(str.equals("WA")){
                cnt[1]++;
            }else if(str.equals("TLE")){
                cnt[2]++;
            }else if(str.equals("RE")){
                cnt[3]++;
            }
        }
        System.out.println("AC x "+cnt[0]);
        System.out.println("WA x "+cnt[1]);
        System.out.println("TLE x "+cnt[2]);
        System.out.println("RE x "+cnt[3]);
    }
}