import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] res = new int[4];
		for (int i = 0; i < N; i++) {
			String tmp = sc.next();
			if (tmp.equals("AC")) {
				res[0]++;
			} else if (tmp.equals("WA")) {
				res[1]++;
			} else if (tmp.equals("TLE")) {
				res[2]++;
			} else if (tmp.equals("RE")) {
				res[3]++;
			}

		}
		System.out.println("AC x " + res[0]);
		System.out.println("WA x " + res[1]);
		System.out.println("TLE x " + res[2]);
		System.out.println("RE x " + res[3]);

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

		}
		System.out.println("AC x " + res[0]);
		System.out.println("WA x " + res[1]);
		System.out.println("TLE x " + res[2]);
		System.out.println("RE x " + res[3]);

	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] res = new int[4];
		for (int i = 0; i < N; i++) {
			String tmp = sc.next();
			if (tmp.equals("AC")) {
				res[0]++;
			} else if (tmp.equals("WA")) {
				res[1]++;
			} else if (tmp.equals("TLE")) {
				res[2]++;
			} else if (tmp.equals("RE")) {
				res[3]++;
			}

		}
		System.out.println("AC x " + res[0]);
		System.out.println("WA x " + res[1]);
		System.out.println("TLE x " + res[2]);
		System.out.println("RE x " + res[3]);

	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] res = new int[4];
		for (int i = 0; i < N; i++) {
			String tmp = sc.next();
			if (tmp.equals("AC")) {
				res[0]++;
			} else if (tmp.equals("WA")) {
				res[1]++;
			} else if (tmp.equals("TLE")) {
				res[2]++;
			} else if (tmp.equals("RE")) {
				res[3]++;
			}

		}
		System.out.println("AC x " + res[0]);
		System.out.println("WA x " + res[1]);
		System.out.println("TLE x " + res[2]);
		System.out.println("RE x " + res[3]);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] res = new int[4]; res new int[4] 4 for (int i = 0; i < N; i++) {
			String tmp = sc.next();
			if (tmp.equals("AC")) {
				res[0]++;
			} else if (tmp.equals("WA")) {
				res[1]++;
			} else if (tmp.equals("TLE")) {
				res[2]++;
			} else if (tmp.equals("RE")) {
				res[3]++;
			}

		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			String tmp = sc.next();
			if (tmp.equals("AC")) {
				res[0]++;
			} else if (tmp.equals("WA")) {
				res[1]++;
			} else if (tmp.equals("TLE")) {
				res[2]++;
			} else if (tmp.equals("RE")) {
				res[3]++;
			}

		} {
			String tmp = sc.next();
			if (tmp.equals("AC")) {
				res[0]++;
			} else if (tmp.equals("WA")) {
				res[1]++;
			} else if (tmp.equals("TLE")) {
				res[2]++;
			} else if (tmp.equals("RE")) {
				res[3]++;
			}

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

		}
		System.out.println("AC x " + res[0]);
		System.out.println("WA x " + res[1]);
		System.out.println("TLE x " + res[2]);
		System.out.println("RE x " + res[3]);

	}
} public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] res = new int[4];
		for (int i = 0; i < N; i++) {
			String tmp = sc.next();
			if (tmp.equals("AC")) {
				res[0]++;
			} else if (tmp.equals("WA")) {
				res[1]++;
			} else if (tmp.equals("TLE")) {
				res[2]++;
			} else if (tmp.equals("RE")) {
				res[3]++;
			}

		}
		System.out.println("AC x " + res[0]);
		System.out.println("WA x " + res[1]);
		System.out.println("TLE x " + res[2]);
		System.out.println("RE x " + res[3]);

	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] res = new int[4];
		for (int i = 0; i < N; i++) {
			String tmp = sc.next();
			if (tmp.equals("AC")) {
				res[0]++;
			} else if (tmp.equals("WA")) {
				res[1]++;
			} else if (tmp.equals("TLE")) {
				res[2]++;
			} else if (tmp.equals("RE")) {
				res[3]++;
			}

		}
		System.out.println("AC x " + res[0]);
		System.out.println("WA x " + res[1]);
		System.out.println("TLE x " + res[2]);
		System.out.println("RE x " + res[3]);

	}
}