import java.util.*;


public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int num = sc.nextInt();
        int countAC = 0;
        int countWA = 0;
        int countTLE = 0;
        int countRE = 0;
         for (int i = 0; i < num; i++) {
            String str = sc.next();
            switch(str) {
                case "AC":
                    countAC++;
                    break;
                case "WA":
                    countWA++;
                    break;
                case "TLE":
                    countTLE++;
                    break;
                case "RE":
                    countRE++;
                    break;
            }
        }
        System.out.println("AC x " + countAC);
        System.out.println("WA x " + countWA);
        System.out.println("TLE x " + countTLE);
        System.out.println("RE x " + countRE);

    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int num = sc.nextInt();
        int countAC = 0;
        int countWA = 0;
        int countTLE = 0;
        int countRE = 0;
         for (int i = 0; i < num; i++) {
            String str = sc.next();
            switch(str) {
                case "AC":
                    countAC++;
                    break;
                case "WA":
                    countWA++;
                    break;
                case "TLE":
                    countTLE++;
                    break;
                case "RE":
                    countRE++;
                    break;
            }
        }
        System.out.println("AC x " + countAC);
        System.out.println("WA x " + countWA);
        System.out.println("TLE x " + countTLE);
        System.out.println("RE x " + countRE);

    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int num = sc.nextInt();
        int countAC = 0;
        int countWA = 0;
        int countTLE = 0;
        int countRE = 0;
         for (int i = 0; i < num; i++) {
            String str = sc.next();
            switch(str) {
                case "AC":
                    countAC++;
                    break;
                case "WA":
                    countWA++;
                    break;
                case "TLE":
                    countTLE++;
                    break;
                case "RE":
                    countRE++;
                    break;
            }
        }
        System.out.println("AC x " + countAC);
        System.out.println("WA x " + countWA);
        System.out.println("TLE x " + countTLE);
        System.out.println("RE x " + countRE);

    } main {
        Scanner sc = new Scanner(System.in);
        
        int num = sc.nextInt();
        int countAC = 0;
        int countWA = 0;
        int countTLE = 0;
        int countRE = 0;
         for (int i = 0; i < num; i++) {
            String str = sc.next();
            switch(str) {
                case "AC":
                    countAC++;
                    break;
                case "WA":
                    countWA++;
                    break;
                case "TLE":
                    countTLE++;
                    break;
                case "RE":
                    countRE++;
                    break;
            }
        }
        System.out.println("AC x " + countAC);
        System.out.println("WA x " + countWA);
        System.out.println("TLE x " + countTLE);
        System.out.println("RE x " + countRE);

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc int countAC = 0; countAC 0 int countWA = 0; countWA 0 int countTLE = 0; countTLE 0 int countRE = 0; countRE 0 for (int i = 0; i < num; i++) {
            String str = sc.next();
            switch(str) {
                case "AC":
                    countAC++;
                    break;
                case "WA":
                    countWA++;
                    break;
                case "TLE":
                    countTLE++;
                    break;
                case "RE":
                    countRE++;
                    break;
            }
        } int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
            String str = sc.next();
            switch(str) {
                case "AC":
                    countAC++;
                    break;
                case "WA":
                    countWA++;
                    break;
                case "TLE":
                    countTLE++;
                    break;
                case "RE":
                    countRE++;
                    break;
            }
        } {
            String str = sc.next();
            switch(str) {
                case "AC":
                    countAC++;
                    break;
                case "WA":
                    countWA++;
                    break;
                case "TLE":
                    countTLE++;
                    break;
                case "RE":
                    countRE++;
                    break;
            }
        } String str = sc.next(); str sc.next() sc.next sc switch(str) {
                case "AC":
                    countAC++;
                    break;
                case "WA":
                    countWA++;
                    break;
                case "TLE":
                    countTLE++;
                    break;
                case "RE":
                    countRE++;
                    break;
            } str case "AC": "AC" case "AC": countAC++ countAC break; case "WA": "WA" case "WA": countWA++ countWA break; case "TLE": "TLE" case "TLE": countTLE++ countTLE break; case "RE": "RE" case "RE": countRE++ countRE break; System.out.println("AC x " + countAC) System.out.println System.out System System.out "AC x " + countAC "AC x " countAC System.out.println("WA x " + countWA) System.out.println System.out System System.out "WA x " + countWA "WA x " countWA System.out.println("TLE x " + countTLE) System.out.println System.out System System.out "TLE x " + countTLE "TLE x " countTLE System.out.println("RE x " + countRE) System.out.println System.out System System.out "RE x " + countRE "RE x " countRE String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int num = sc.nextInt();
        int countAC = 0;
        int countWA = 0;
        int countTLE = 0;
        int countRE = 0;
         for (int i = 0; i < num; i++) {
            String str = sc.next();
            switch(str) {
                case "AC":
                    countAC++;
                    break;
                case "WA":
                    countWA++;
                    break;
                case "TLE":
                    countTLE++;
                    break;
                case "RE":
                    countRE++;
                    break;
            }
        }
        System.out.println("AC x " + countAC);
        System.out.println("WA x " + countWA);
        System.out.println("TLE x " + countTLE);
        System.out.println("RE x " + countRE);

    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int num = sc.nextInt();
        int countAC = 0;
        int countWA = 0;
        int countTLE = 0;
        int countRE = 0;
         for (int i = 0; i < num; i++) {
            String str = sc.next();
            switch(str) {
                case "AC":
                    countAC++;
                    break;
                case "WA":
                    countWA++;
                    break;
                case "TLE":
                    countTLE++;
                    break;
                case "RE":
                    countRE++;
                    break;
            }
        }
        System.out.println("AC x " + countAC);
        System.out.println("WA x " + countWA);
        System.out.println("TLE x " + countTLE);
        System.out.println("RE x " + countRE);

    }
} Main
import java.util.*;


public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int num = sc.nextInt();
        int countAC = 0;
        int countWA = 0;
        int countTLE = 0;
        int countRE = 0;
         for (int i = 0; i < num; i++) {
            String str = sc.next();
            switch(str) {
                case "AC":
                    countAC++;
                    break;
                case "WA":
                    countWA++;
                    break;
                case "TLE":
                    countTLE++;
                    break;
                case "RE":
                    countRE++;
                    break;
            }
        }
        System.out.println("AC x " + countAC);
        System.out.println("WA x " + countWA);
        System.out.println("TLE x " + countTLE);
        System.out.println("RE x " + countRE);

    }
}