import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] s = {"AC", "WA", "TLE", "RE"};
		int[] ans = new int[4];
		for (int N = sc.nextInt(); N > 0; N--) {
			String t = sc.next();
			for (int i = 0; i < 4; i++) {
				if (t.charAt(0) == s[i].charAt(0))
					ans[i]++;
			}
		}
		for (int i = 0; i < 4; i++) {
			System.out.println(s[i] + " x " + ans[i]);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] s = {"AC", "WA", "TLE", "RE"};
		int[] ans = new int[4];
		for (int N = sc.nextInt(); N > 0; N--) {
			String t = sc.next();
			for (int i = 0; i < 4; i++) {
				if (t.charAt(0) == s[i].charAt(0))
					ans[i]++;
			}
		}
		for (int i = 0; i < 4; i++) {
			System.out.println(s[i] + " x " + ans[i]);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] s = {"AC", "WA", "TLE", "RE"};
		int[] ans = new int[4];
		for (int N = sc.nextInt(); N > 0; N--) {
			String t = sc.next();
			for (int i = 0; i < 4; i++) {
				if (t.charAt(0) == s[i].charAt(0))
					ans[i]++;
			}
		}
		for (int i = 0; i < 4; i++) {
			System.out.println(s[i] + " x " + ans[i]);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String[] s = {"AC", "WA", "TLE", "RE"};
		int[] ans = new int[4];
		for (int N = sc.nextInt(); N > 0; N--) {
			String t = sc.next();
			for (int i = 0; i < 4; i++) {
				if (t.charAt(0) == s[i].charAt(0))
					ans[i]++;
			}
		}
		for (int i = 0; i < 4; i++) {
			System.out.println(s[i] + " x " + ans[i]);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] s = {"AC", "WA", "TLE", "RE"}; s {"AC", "WA", "TLE", "RE"} "AC" "WA" "TLE" "RE" int[] ans = new int[4]; ans new int[4] 4 for (int N = sc.nextInt(); N > 0; N--) {
			String t = sc.next();
			for (int i = 0; i < 4; i++) {
				if (t.charAt(0) == s[i].charAt(0))
					ans[i]++;
			}
		} int N = sc.nextInt(); int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc N > 0 N 0 N-- N-- N {
			String t = sc.next();
			for (int i = 0; i < 4; i++) {
				if (t.charAt(0) == s[i].charAt(0))
					ans[i]++;
			}
		} {
			String t = sc.next();
			for (int i = 0; i < 4; i++) {
				if (t.charAt(0) == s[i].charAt(0))
					ans[i]++;
			}
		} String t = sc.next(); t sc.next() sc.next sc for (int i = 0; i < 4; i++) {
				if (t.charAt(0) == s[i].charAt(0))
					ans[i]++;
			} int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
				if (t.charAt(0) == s[i].charAt(0))
					ans[i]++;
			} {
				if (t.charAt(0) == s[i].charAt(0))
					ans[i]++;
			} if (t.charAt(0) == s[i].charAt(0))
					ans[i]++; t.charAt(0) == s[i].charAt(0) t.charAt(0) t.charAt t 0 s[i].charAt(0) s[i].charAt s[i] s i 0 ans[i]++ ans[i] ans i for (int i = 0; i < 4; i++) {
			System.out.println(s[i] + " x " + ans[i]);
		} int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
			System.out.println(s[i] + " x " + ans[i]);
		} {
			System.out.println(s[i] + " x " + ans[i]);
		} System.out.println(s[i] + " x " + ans[i]) System.out.println System.out System System.out s[i] + " x " + ans[i] s[i] + " x " + ans[i] s[i] s i " x " ans[i] ans i String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] s = {"AC", "WA", "TLE", "RE"};
		int[] ans = new int[4];
		for (int N = sc.nextInt(); N > 0; N--) {
			String t = sc.next();
			for (int i = 0; i < 4; i++) {
				if (t.charAt(0) == s[i].charAt(0))
					ans[i]++;
			}
		}
		for (int i = 0; i < 4; i++) {
			System.out.println(s[i] + " x " + ans[i]);
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] s = {"AC", "WA", "TLE", "RE"};
		int[] ans = new int[4];
		for (int N = sc.nextInt(); N > 0; N--) {
			String t = sc.next();
			for (int i = 0; i < 4; i++) {
				if (t.charAt(0) == s[i].charAt(0))
					ans[i]++;
			}
		}
		for (int i = 0; i < 4; i++) {
			System.out.println(s[i] + " x " + ans[i]);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] s = {"AC", "WA", "TLE", "RE"};
		int[] ans = new int[4];
		for (int N = sc.nextInt(); N > 0; N--) {
			String t = sc.next();
			for (int i = 0; i < 4; i++) {
				if (t.charAt(0) == s[i].charAt(0))
					ans[i]++;
			}
		}
		for (int i = 0; i < 4; i++) {
			System.out.println(s[i] + " x " + ans[i]);
		}
	}
}
