import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int a = 0;
		int w = 0;
		int t = 0;
		int r = 0;
		for (int i = 0; i < N; i++) {
			String S = scanner.next();
			if (S.equals("AC")) {
				a += 1;
			} else if (S.equals("WA")) {
				w += 1;
			} else if (S.equals("TLE")) {
				t += 1;
			} else {
				r += 1;
			}
		}
		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 scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int a = 0;
		int w = 0;
		int t = 0;
		int r = 0;
		for (int i = 0; i < N; i++) {
			String S = scanner.next();
			if (S.equals("AC")) {
				a += 1;
			} else if (S.equals("WA")) {
				w += 1;
			} else if (S.equals("TLE")) {
				t += 1;
			} else {
				r += 1;
			}
		}
		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 scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int a = 0;
		int w = 0;
		int t = 0;
		int r = 0;
		for (int i = 0; i < N; i++) {
			String S = scanner.next();
			if (S.equals("AC")) {
				a += 1;
			} else if (S.equals("WA")) {
				w += 1;
			} else if (S.equals("TLE")) {
				t += 1;
			} else {
				r += 1;
			}
		}
		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 scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int a = 0;
		int w = 0;
		int t = 0;
		int r = 0;
		for (int i = 0; i < N; i++) {
			String S = scanner.next();
			if (S.equals("AC")) {
				a += 1;
			} else if (S.equals("WA")) {
				w += 1;
			} else if (S.equals("TLE")) {
				t += 1;
			} else {
				r += 1;
			}
		}
		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 scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int a = 0; a 0 int w = 0; w 0 int t = 0; t 0 int r = 0; r 0 for (int i = 0; i < N; i++) {
			String S = scanner.next();
			if (S.equals("AC")) {
				a += 1;
			} else if (S.equals("WA")) {
				w += 1;
			} else if (S.equals("TLE")) {
				t += 1;
			} else {
				r += 1;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			String S = scanner.next();
			if (S.equals("AC")) {
				a += 1;
			} else if (S.equals("WA")) {
				w += 1;
			} else if (S.equals("TLE")) {
				t += 1;
			} else {
				r += 1;
			}
		} {
			String S = scanner.next();
			if (S.equals("AC")) {
				a += 1;
			} else if (S.equals("WA")) {
				w += 1;
			} else if (S.equals("TLE")) {
				t += 1;
			} else {
				r += 1;
			}
		} String S = scanner.next(); S scanner.next() scanner.next scanner if (S.equals("AC")) {
				a += 1;
			} else if (S.equals("WA")) {
				w += 1;
			} else if (S.equals("TLE")) {
				t += 1;
			} else {
				r += 1;
			} S.equals("AC") S.equals S "AC" {
				a += 1;
			} a += 1 a 1 if (S.equals("WA")) {
				w += 1;
			} else if (S.equals("TLE")) {
				t += 1;
			} else {
				r += 1;
			} S.equals("WA") S.equals S "WA" {
				w += 1;
			} w += 1 w 1 if (S.equals("TLE")) {
				t += 1;
			} else {
				r += 1;
			} S.equals("TLE") S.equals S "TLE" {
				t += 1;
			} t += 1 t 1 {
				r += 1;
			} r += 1 r 1 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 scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int a = 0;
		int w = 0;
		int t = 0;
		int r = 0;
		for (int i = 0; i < N; i++) {
			String S = scanner.next();
			if (S.equals("AC")) {
				a += 1;
			} else if (S.equals("WA")) {
				w += 1;
			} else if (S.equals("TLE")) {
				t += 1;
			} else {
				r += 1;
			}
		}
		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 scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int a = 0;
		int w = 0;
		int t = 0;
		int r = 0;
		for (int i = 0; i < N; i++) {
			String S = scanner.next();
			if (S.equals("AC")) {
				a += 1;
			} else if (S.equals("WA")) {
				w += 1;
			} else if (S.equals("TLE")) {
				t += 1;
			} else {
				r += 1;
			}
		}
		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 scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int a = 0;
		int w = 0;
		int t = 0;
		int r = 0;
		for (int i = 0; i < N; i++) {
			String S = scanner.next();
			if (S.equals("AC")) {
				a += 1;
			} else if (S.equals("WA")) {
				w += 1;
			} else if (S.equals("TLE")) {
				t += 1;
			} else {
				r += 1;
			}
		}
		System.out.println("AC x " + a);
		System.out.println("WA x " + w);
		System.out.println("TLE x " + t);
		System.out.println("RE x " + r);
	}
}