import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int a = 0,t = 0,w = 0,r = 0;
        while(n-->0){
            String str = s.next();

            switch (str) {
                case "AC":
                    a++;
                    break;
                case "RE":
                    r++;
                    break;
                case "TLE":
                    t++;
                    break;
                case "WA":
                    w++;
                    break;
            }
        }
        System.out.println("AC x "+a);
        System.out.println("WA x "+w);
        System.out.println("TLE x "+t);
        System.out.println("RE x "+r);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int a = 0,t = 0,w = 0,r = 0;
        while(n-->0){
            String str = s.next();

            switch (str) {
                case "AC":
                    a++;
                    break;
                case "RE":
                    r++;
                    break;
                case "TLE":
                    t++;
                    break;
                case "WA":
                    w++;
                    break;
            }
        }
        System.out.println("AC x "+a);
        System.out.println("WA x "+w);
        System.out.println("TLE x "+t);
        System.out.println("RE x "+r);
    }
} Main public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int a = 0,t = 0,w = 0,r = 0;
        while(n-->0){
            String str = s.next();

            switch (str) {
                case "AC":
                    a++;
                    break;
                case "RE":
                    r++;
                    break;
                case "TLE":
                    t++;
                    break;
                case "WA":
                    w++;
                    break;
            }
        }
        System.out.println("AC x "+a);
        System.out.println("WA x "+w);
        System.out.println("TLE x "+t);
        System.out.println("RE x "+r);
    } main {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int a = 0,t = 0,w = 0,r = 0;
        while(n-->0){
            String str = s.next();

            switch (str) {
                case "AC":
                    a++;
                    break;
                case "RE":
                    r++;
                    break;
                case "TLE":
                    t++;
                    break;
                case "WA":
                    w++;
                    break;
            }
        }
        System.out.println("AC x "+a);
        System.out.println("WA x "+w);
        System.out.println("TLE x "+t);
        System.out.println("RE x "+r);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = Integer.parseInt(s.next()); n Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s int a = 0 a 0 t = 0 t 0 w = 0 w 0 r = 0; r 0 while(n-->0){
            String str = s.next();

            switch (str) {
                case "AC":
                    a++;
                    break;
                case "RE":
                    r++;
                    break;
                case "TLE":
                    t++;
                    break;
                case "WA":
                    w++;
                    break;
            }
        } n-->0 n-- n 0 {
            String str = s.next();

            switch (str) {
                case "AC":
                    a++;
                    break;
                case "RE":
                    r++;
                    break;
                case "TLE":
                    t++;
                    break;
                case "WA":
                    w++;
                    break;
            }
        } String str = s.next(); str s.next() s.next s switch (str) {
                case "AC":
                    a++;
                    break;
                case "RE":
                    r++;
                    break;
                case "TLE":
                    t++;
                    break;
                case "WA":
                    w++;
                    break;
            } str case "AC": "AC" case "AC": a++ a break; case "RE": "RE" case "RE": r++ r break; case "TLE": "TLE" case "TLE": t++ t break; case "WA": "WA" case "WA": w++ w break; 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 "+w) System.out.println System.out System System.out "WA x "+w "WA x " w System.out.println("TLE x "+t) System.out.println System.out System System.out "TLE x "+t "TLE x " t System.out.println("RE x "+r) System.out.println System.out System System.out "RE x "+r "RE x " r String[] args args public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int a = 0,t = 0,w = 0,r = 0;
        while(n-->0){
            String str = s.next();

            switch (str) {
                case "AC":
                    a++;
                    break;
                case "RE":
                    r++;
                    break;
                case "TLE":
                    t++;
                    break;
                case "WA":
                    w++;
                    break;
            }
        }
        System.out.println("AC x "+a);
        System.out.println("WA x "+w);
        System.out.println("TLE x "+t);
        System.out.println("RE x "+r);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int a = 0,t = 0,w = 0,r = 0;
        while(n-->0){
            String str = s.next();

            switch (str) {
                case "AC":
                    a++;
                    break;
                case "RE":
                    r++;
                    break;
                case "TLE":
                    t++;
                    break;
                case "WA":
                    w++;
                    break;
            }
        }
        System.out.println("AC x "+a);
        System.out.println("WA x "+w);
        System.out.println("TLE x "+t);
        System.out.println("RE x "+r);
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int a = 0,t = 0,w = 0,r = 0;
        while(n-->0){
            String str = s.next();

            switch (str) {
                case "AC":
                    a++;
                    break;
                case "RE":
                    r++;
                    break;
                case "TLE":
                    t++;
                    break;
                case "WA":
                    w++;
                    break;
            }
        }
        System.out.println("AC x "+a);
        System.out.println("WA x "+w);
        System.out.println("TLE x "+t);
        System.out.println("RE x "+r);
    }
}
