import java.util.*;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] s = new String[n];
		int a = 0;
		int b = 0;
		int c = 0;
		int d = 0;

		for (int i = 0; i < n; i++) {
			s[i] = sc.next();

			if (s[i].equals("AC")) {
				a++;
			} else if (s[i].equals("WA")) {
				b++;
			} else if (s[i].equals("TLE")) {
				c++;
			} else {
				d++;
			}
		}
		System.out.println("AC x " + a);
		System.out.println("WA x " + b);
		System.out.println("TLE x " + c);
		System.out.println("RE x " + d);
		sc.close();
	}

} import java.util.*; util.* java import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] s = new String[n];
		int a = 0;
		int b = 0;
		int c = 0;
		int d = 0;

		for (int i = 0; i < n; i++) {
			s[i] = sc.next();

			if (s[i].equals("AC")) {
				a++;
			} else if (s[i].equals("WA")) {
				b++;
			} else if (s[i].equals("TLE")) {
				c++;
			} else {
				d++;
			}
		}
		System.out.println("AC x " + a);
		System.out.println("WA x " + b);
		System.out.println("TLE x " + c);
		System.out.println("RE x " + d);
		sc.close();
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] s = new String[n];
		int a = 0;
		int b = 0;
		int c = 0;
		int d = 0;

		for (int i = 0; i < n; i++) {
			s[i] = sc.next();

			if (s[i].equals("AC")) {
				a++;
			} else if (s[i].equals("WA")) {
				b++;
			} else if (s[i].equals("TLE")) {
				c++;
			} else {
				d++;
			}
		}
		System.out.println("AC x " + a);
		System.out.println("WA x " + b);
		System.out.println("TLE x " + c);
		System.out.println("RE x " + d);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] s = new String[n];
		int a = 0;
		int b = 0;
		int c = 0;
		int d = 0;

		for (int i = 0; i < n; i++) {
			s[i] = sc.next();

			if (s[i].equals("AC")) {
				a++;
			} else if (s[i].equals("WA")) {
				b++;
			} else if (s[i].equals("TLE")) {
				c++;
			} else {
				d++;
			}
		}
		System.out.println("AC x " + a);
		System.out.println("WA x " + b);
		System.out.println("TLE x " + c);
		System.out.println("RE x " + d);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String[] s = new String[n]; s new String[n] n int a = 0; a 0 int b = 0; b 0 int c = 0; c 0 int d = 0; d 0 for (int i = 0; i < n; i++) {
			s[i] = sc.next();

			if (s[i].equals("AC")) {
				a++;
			} else if (s[i].equals("WA")) {
				b++;
			} else if (s[i].equals("TLE")) {
				c++;
			} else {
				d++;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			s[i] = sc.next();

			if (s[i].equals("AC")) {
				a++;
			} else if (s[i].equals("WA")) {
				b++;
			} else if (s[i].equals("TLE")) {
				c++;
			} else {
				d++;
			}
		} {
			s[i] = sc.next();

			if (s[i].equals("AC")) {
				a++;
			} else if (s[i].equals("WA")) {
				b++;
			} else if (s[i].equals("TLE")) {
				c++;
			} else {
				d++;
			}
		} s[i] = sc.next() s[i] s i sc.next() sc.next sc if (s[i].equals("AC")) {
				a++;
			} else if (s[i].equals("WA")) {
				b++;
			} else if (s[i].equals("TLE")) {
				c++;
			} else {
				d++;
			} s[i].equals("AC") s[i].equals s[i] s i "AC" {
				a++;
			} a++ a if (s[i].equals("WA")) {
				b++;
			} else if (s[i].equals("TLE")) {
				c++;
			} else {
				d++;
			} s[i].equals("WA") s[i].equals s[i] s i "WA" {
				b++;
			} b++ b if (s[i].equals("TLE")) {
				c++;
			} else {
				d++;
			} s[i].equals("TLE") s[i].equals s[i] s i "TLE" {
				c++;
			} c++ c {
				d++;
			} d++ d 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 " + b) System.out.println System.out System System.out "WA x " + b "WA x " b System.out.println("TLE x " + c) System.out.println System.out System System.out "TLE x " + c "TLE x " c System.out.println("RE x " + d) System.out.println System.out System System.out "RE x " + d "RE x " d sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] s = new String[n];
		int a = 0;
		int b = 0;
		int c = 0;
		int d = 0;

		for (int i = 0; i < n; i++) {
			s[i] = sc.next();

			if (s[i].equals("AC")) {
				a++;
			} else if (s[i].equals("WA")) {
				b++;
			} else if (s[i].equals("TLE")) {
				c++;
			} else {
				d++;
			}
		}
		System.out.println("AC x " + a);
		System.out.println("WA x " + b);
		System.out.println("TLE x " + c);
		System.out.println("RE x " + d);
		sc.close();
	}

} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] s = new String[n];
		int a = 0;
		int b = 0;
		int c = 0;
		int d = 0;

		for (int i = 0; i < n; i++) {
			s[i] = sc.next();

			if (s[i].equals("AC")) {
				a++;
			} else if (s[i].equals("WA")) {
				b++;
			} else if (s[i].equals("TLE")) {
				c++;
			} else {
				d++;
			}
		}
		System.out.println("AC x " + a);
		System.out.println("WA x " + b);
		System.out.println("TLE x " + c);
		System.out.println("RE x " + d);
		sc.close();
	}

} Main
import java.util.*;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] s = new String[n];
		int a = 0;
		int b = 0;
		int c = 0;
		int d = 0;

		for (int i = 0; i < n; i++) {
			s[i] = sc.next();

			if (s[i].equals("AC")) {
				a++;
			} else if (s[i].equals("WA")) {
				b++;
			} else if (s[i].equals("TLE")) {
				c++;
			} else {
				d++;
			}
		}
		System.out.println("AC x " + a);
		System.out.println("WA x " + b);
		System.out.println("TLE x " + c);
		System.out.println("RE x " + d);
		sc.close();
	}

}