import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int acCnt = 0;
        int waCnt = 0;
        int tleCnt = 0;
        int reCnt = 0;
        for (int i = 0; i < n; i++) {
            String result = sc.next();
            switch (result) {
                case "AC":
                    acCnt++;
                    break;
                case "WA":
                    waCnt++;
                    break;
                case "TLE":
                    tleCnt++;
                    break;
                case "RE":
                    reCnt++;
                    break;
                default:

            }
        }
        sc.close();
        System.out.println("AC x " + String.valueOf(acCnt));
        System.out.println("WA x " + String.valueOf(waCnt));
        System.out.println("TLE x " + String.valueOf(tleCnt));
        System.out.println("RE x " + String.valueOf(reCnt));
    }
} 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 acCnt = 0;
        int waCnt = 0;
        int tleCnt = 0;
        int reCnt = 0;
        for (int i = 0; i < n; i++) {
            String result = sc.next();
            switch (result) {
                case "AC":
                    acCnt++;
                    break;
                case "WA":
                    waCnt++;
                    break;
                case "TLE":
                    tleCnt++;
                    break;
                case "RE":
                    reCnt++;
                    break;
                default:

            }
        }
        sc.close();
        System.out.println("AC x " + String.valueOf(acCnt));
        System.out.println("WA x " + String.valueOf(waCnt));
        System.out.println("TLE x " + String.valueOf(tleCnt));
        System.out.println("RE x " + String.valueOf(reCnt));
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int acCnt = 0;
        int waCnt = 0;
        int tleCnt = 0;
        int reCnt = 0;
        for (int i = 0; i < n; i++) {
            String result = sc.next();
            switch (result) {
                case "AC":
                    acCnt++;
                    break;
                case "WA":
                    waCnt++;
                    break;
                case "TLE":
                    tleCnt++;
                    break;
                case "RE":
                    reCnt++;
                    break;
                default:

            }
        }
        sc.close();
        System.out.println("AC x " + String.valueOf(acCnt));
        System.out.println("WA x " + String.valueOf(waCnt));
        System.out.println("TLE x " + String.valueOf(tleCnt));
        System.out.println("RE x " + String.valueOf(reCnt));
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int acCnt = 0;
        int waCnt = 0;
        int tleCnt = 0;
        int reCnt = 0;
        for (int i = 0; i < n; i++) {
            String result = sc.next();
            switch (result) {
                case "AC":
                    acCnt++;
                    break;
                case "WA":
                    waCnt++;
                    break;
                case "TLE":
                    tleCnt++;
                    break;
                case "RE":
                    reCnt++;
                    break;
                default:

            }
        }
        sc.close();
        System.out.println("AC x " + String.valueOf(acCnt));
        System.out.println("WA x " + String.valueOf(waCnt));
        System.out.println("TLE x " + String.valueOf(tleCnt));
        System.out.println("RE x " + String.valueOf(reCnt));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int acCnt = 0; acCnt 0 int waCnt = 0; waCnt 0 int tleCnt = 0; tleCnt 0 int reCnt = 0; reCnt 0 for (int i = 0; i < n; i++) {
            String result = sc.next();
            switch (result) {
                case "AC":
                    acCnt++;
                    break;
                case "WA":
                    waCnt++;
                    break;
                case "TLE":
                    tleCnt++;
                    break;
                case "RE":
                    reCnt++;
                    break;
                default:

            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String result = sc.next();
            switch (result) {
                case "AC":
                    acCnt++;
                    break;
                case "WA":
                    waCnt++;
                    break;
                case "TLE":
                    tleCnt++;
                    break;
                case "RE":
                    reCnt++;
                    break;
                default:

            }
        } {
            String result = sc.next();
            switch (result) {
                case "AC":
                    acCnt++;
                    break;
                case "WA":
                    waCnt++;
                    break;
                case "TLE":
                    tleCnt++;
                    break;
                case "RE":
                    reCnt++;
                    break;
                default:

            }
        } String result = sc.next(); result sc.next() sc.next sc switch (result) {
                case "AC":
                    acCnt++;
                    break;
                case "WA":
                    waCnt++;
                    break;
                case "TLE":
                    tleCnt++;
                    break;
                case "RE":
                    reCnt++;
                    break;
                default:

            } result case "AC": "AC" case "AC": acCnt++ acCnt break; case "WA": "WA" case "WA": waCnt++ waCnt break; case "TLE": "TLE" case "TLE": tleCnt++ tleCnt break; case "RE": "RE" case "RE": reCnt++ reCnt break; default: default: sc.close() sc.close sc System.out.println("AC x " + String.valueOf(acCnt)) System.out.println System.out System System.out "AC x " + String.valueOf(acCnt) "AC x " String.valueOf(acCnt) String.valueOf String acCnt System.out.println("WA x " + String.valueOf(waCnt)) System.out.println System.out System System.out "WA x " + String.valueOf(waCnt) "WA x " String.valueOf(waCnt) String.valueOf String waCnt System.out.println("TLE x " + String.valueOf(tleCnt)) System.out.println System.out System System.out "TLE x " + String.valueOf(tleCnt) "TLE x " String.valueOf(tleCnt) String.valueOf String tleCnt System.out.println("RE x " + String.valueOf(reCnt)) System.out.println System.out System System.out "RE x " + String.valueOf(reCnt) "RE x " String.valueOf(reCnt) String.valueOf String reCnt String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int acCnt = 0;
        int waCnt = 0;
        int tleCnt = 0;
        int reCnt = 0;
        for (int i = 0; i < n; i++) {
            String result = sc.next();
            switch (result) {
                case "AC":
                    acCnt++;
                    break;
                case "WA":
                    waCnt++;
                    break;
                case "TLE":
                    tleCnt++;
                    break;
                case "RE":
                    reCnt++;
                    break;
                default:

            }
        }
        sc.close();
        System.out.println("AC x " + String.valueOf(acCnt));
        System.out.println("WA x " + String.valueOf(waCnt));
        System.out.println("TLE x " + String.valueOf(tleCnt));
        System.out.println("RE x " + String.valueOf(reCnt));
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int acCnt = 0;
        int waCnt = 0;
        int tleCnt = 0;
        int reCnt = 0;
        for (int i = 0; i < n; i++) {
            String result = sc.next();
            switch (result) {
                case "AC":
                    acCnt++;
                    break;
                case "WA":
                    waCnt++;
                    break;
                case "TLE":
                    tleCnt++;
                    break;
                case "RE":
                    reCnt++;
                    break;
                default:

            }
        }
        sc.close();
        System.out.println("AC x " + String.valueOf(acCnt));
        System.out.println("WA x " + String.valueOf(waCnt));
        System.out.println("TLE x " + String.valueOf(tleCnt));
        System.out.println("RE x " + String.valueOf(reCnt));
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int acCnt = 0;
        int waCnt = 0;
        int tleCnt = 0;
        int reCnt = 0;
        for (int i = 0; i < n; i++) {
            String result = sc.next();
            switch (result) {
                case "AC":
                    acCnt++;
                    break;
                case "WA":
                    waCnt++;
                    break;
                case "TLE":
                    tleCnt++;
                    break;
                case "RE":
                    reCnt++;
                    break;
                default:

            }
        }
        sc.close();
        System.out.println("AC x " + String.valueOf(acCnt));
        System.out.println("WA x " + String.valueOf(waCnt));
        System.out.println("TLE x " + String.valueOf(tleCnt));
        System.out.println("RE x " + String.valueOf(reCnt));
    }
}
