import java.util.*;
import java.io.*;

class Main {
	public static void main(String[] args) throws IOException {
		setIO();

		int N = ni();
		
		HashMap<String, Integer> m = new HashMap<>();
		for (int i = 0; i < N; i++) {
			String s = f.readLine();
			m.put(s, m.getOrDefault(s, 0) + 1);
		}
		
		out.println("AC x " + m.getOrDefault("AC", 0));
		out.println("WA x " + m.getOrDefault("WA", 0));
		out.println("TLE x " + m.getOrDefault("TLE", 0));
		out.println("RE x " + m.getOrDefault("RE", 0));
		
		f.close();
		out.close();
	}

	static BufferedReader f;
	static PrintWriter out;
	static StringTokenizer st;

	static int ni(StringTokenizer st) {
		return Integer.parseInt(st.nextToken());
	}

	static int ni() throws IOException {
		return Integer.parseInt(f.readLine());
	}

	static StringTokenizer nl() throws IOException {
		return new StringTokenizer(f.readLine());
	}

	static int[] nia(int N) throws IOException {
		StringTokenizer st = nl();
		int[] A = new int[N];
		for (int i = 0; i < N; i++)
			A[i] = ni(st);
		return A;
	}

	static void setIn(String s) throws IOException {
		f = new BufferedReader(new FileReader(s));
	}

	static void setOut(String s) throws IOException {
		out = new PrintWriter(new FileWriter(s));
	}

	static void setIn() {
		f = new BufferedReader(new InputStreamReader(System.in));
	}

	static void setOut() {
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	}

	static void setIO(String s) throws IOException {
		setIn(s + ".in");
		setOut(s + ".out");
	}

	static void setIO() {
		setIn();
		setOut();
	}
} import java.util.*; util.* java import java.io.*; io.* java class Main {
	public static void main(String[] args) throws IOException {
		setIO();

		int N = ni();
		
		HashMap<String, Integer> m = new HashMap<>();
		for (int i = 0; i < N; i++) {
			String s = f.readLine();
			m.put(s, m.getOrDefault(s, 0) + 1);
		}
		
		out.println("AC x " + m.getOrDefault("AC", 0));
		out.println("WA x " + m.getOrDefault("WA", 0));
		out.println("TLE x " + m.getOrDefault("TLE", 0));
		out.println("RE x " + m.getOrDefault("RE", 0));
		
		f.close();
		out.close();
	}

	static BufferedReader f;
	static PrintWriter out;
	static StringTokenizer st;

	static int ni(StringTokenizer st) {
		return Integer.parseInt(st.nextToken());
	}

	static int ni() throws IOException {
		return Integer.parseInt(f.readLine());
	}

	static StringTokenizer nl() throws IOException {
		return new StringTokenizer(f.readLine());
	}

	static int[] nia(int N) throws IOException {
		StringTokenizer st = nl();
		int[] A = new int[N];
		for (int i = 0; i < N; i++)
			A[i] = ni(st);
		return A;
	}

	static void setIn(String s) throws IOException {
		f = new BufferedReader(new FileReader(s));
	}

	static void setOut(String s) throws IOException {
		out = new PrintWriter(new FileWriter(s));
	}

	static void setIn() {
		f = new BufferedReader(new InputStreamReader(System.in));
	}

	static void setOut() {
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	}

	static void setIO(String s) throws IOException {
		setIn(s + ".in");
		setOut(s + ".out");
	}

	static void setIO() {
		setIn();
		setOut();
	}
} Main static BufferedReader f; f static PrintWriter out; out static StringTokenizer st; st public static void main(String[] args) throws IOException {
		setIO();

		int N = ni();
		
		HashMap<String, Integer> m = new HashMap<>();
		for (int i = 0; i < N; i++) {
			String s = f.readLine();
			m.put(s, m.getOrDefault(s, 0) + 1);
		}
		
		out.println("AC x " + m.getOrDefault("AC", 0));
		out.println("WA x " + m.getOrDefault("WA", 0));
		out.println("TLE x " + m.getOrDefault("TLE", 0));
		out.println("RE x " + m.getOrDefault("RE", 0));
		
		f.close();
		out.close();
	} main {
		setIO();

		int N = ni();
		
		HashMap<String, Integer> m = new HashMap<>();
		for (int i = 0; i < N; i++) {
			String s = f.readLine();
			m.put(s, m.getOrDefault(s, 0) + 1);
		}
		
		out.println("AC x " + m.getOrDefault("AC", 0));
		out.println("WA x " + m.getOrDefault("WA", 0));
		out.println("TLE x " + m.getOrDefault("TLE", 0));
		out.println("RE x " + m.getOrDefault("RE", 0));
		
		f.close();
		out.close();
	} setIO() setIO int N = ni(); N ni() ni HashMap<String, Integer> m = new HashMap<>(); m new HashMap<>() for (int i = 0; i < N; i++) {
			String s = f.readLine();
			m.put(s, m.getOrDefault(s, 0) + 1);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			String s = f.readLine();
			m.put(s, m.getOrDefault(s, 0) + 1);
		} {
			String s = f.readLine();
			m.put(s, m.getOrDefault(s, 0) + 1);
		} String s = f.readLine(); s f.readLine() f.readLine f m.put(s, m.getOrDefault(s, 0) + 1) m.put m s m.getOrDefault(s, 0) + 1 m.getOrDefault(s, 0) m.getOrDefault m s 0 1 out.println("AC x " + m.getOrDefault("AC", 0)) out.println out "AC x " + m.getOrDefault("AC", 0) "AC x " m.getOrDefault("AC", 0) m.getOrDefault m "AC" 0 out.println("WA x " + m.getOrDefault("WA", 0)) out.println out "WA x " + m.getOrDefault("WA", 0) "WA x " m.getOrDefault("WA", 0) m.getOrDefault m "WA" 0 out.println("TLE x " + m.getOrDefault("TLE", 0)) out.println out "TLE x " + m.getOrDefault("TLE", 0) "TLE x " m.getOrDefault("TLE", 0) m.getOrDefault m "TLE" 0 out.println("RE x " + m.getOrDefault("RE", 0)) out.println out "RE x " + m.getOrDefault("RE", 0) "RE x " m.getOrDefault("RE", 0) m.getOrDefault m "RE" 0 f.close() f.close f out.close() out.close out String[] args args static int ni(StringTokenizer st) {
		return Integer.parseInt(st.nextToken());
	} ni {
		return Integer.parseInt(st.nextToken());
	} return Integer.parseInt(st.nextToken()); Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st StringTokenizer st st static int ni() throws IOException {
		return Integer.parseInt(f.readLine());
	} ni {
		return Integer.parseInt(f.readLine());
	} return Integer.parseInt(f.readLine()); Integer.parseInt(f.readLine()) Integer.parseInt Integer f.readLine() f.readLine f static StringTokenizer nl() throws IOException {
		return new StringTokenizer(f.readLine());
	} nl {
		return new StringTokenizer(f.readLine());
	} return new StringTokenizer(f.readLine()); new StringTokenizer(f.readLine()) static int[] nia(int N) throws IOException {
		StringTokenizer st = nl();
		int[] A = new int[N];
		for (int i = 0; i < N; i++)
			A[i] = ni(st);
		return A;
	} nia {
		StringTokenizer st = nl();
		int[] A = new int[N];
		for (int i = 0; i < N; i++)
			A[i] = ni(st);
		return A;
	} StringTokenizer st = nl(); st nl() nl int[] A = new int[N]; A new int[N] N for (int i = 0; i < N; i++)
			A[i] = ni(st); int i = 0; int i = 0; i 0 i < N i N i++ i++ i A[i] = ni(st); A[i] = ni(st) A[i] A i ni(st) ni st return A; A int N N static void setIn(String s) throws IOException {
		f = new BufferedReader(new FileReader(s));
	} setIn {
		f = new BufferedReader(new FileReader(s));
	} f = new BufferedReader(new FileReader(s)) f new BufferedReader(new FileReader(s)) String s s static void setOut(String s) throws IOException {
		out = new PrintWriter(new FileWriter(s));
	} setOut {
		out = new PrintWriter(new FileWriter(s));
	} out = new PrintWriter(new FileWriter(s)) out new PrintWriter(new FileWriter(s)) String s s static void setIn() {
		f = new BufferedReader(new InputStreamReader(System.in));
	} setIn {
		f = new BufferedReader(new InputStreamReader(System.in));
	} f = new BufferedReader(new InputStreamReader(System.in)) f new BufferedReader(new InputStreamReader(System.in)) static void setOut() {
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	} setOut {
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	} out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))) out new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))) static void setIO(String s) throws IOException {
		setIn(s + ".in");
		setOut(s + ".out");
	} setIO {
		setIn(s + ".in");
		setOut(s + ".out");
	} setIn(s + ".in") setIn s + ".in" s ".in" setOut(s + ".out") setOut s + ".out" s ".out" String s s static void setIO() {
		setIn();
		setOut();
	} setIO {
		setIn();
		setOut();
	} setIn() setIn setOut() setOut
import java.util.*;
import java.io.*;

class Main {
	public static void main(String[] args) throws IOException {
		setIO();

		int N = ni();
		
		HashMap<String, Integer> m = new HashMap<>();
		for (int i = 0; i < N; i++) {
			String s = f.readLine();
			m.put(s, m.getOrDefault(s, 0) + 1);
		}
		
		out.println("AC x " + m.getOrDefault("AC", 0));
		out.println("WA x " + m.getOrDefault("WA", 0));
		out.println("TLE x " + m.getOrDefault("TLE", 0));
		out.println("RE x " + m.getOrDefault("RE", 0));
		
		f.close();
		out.close();
	}

	static BufferedReader f;
	static PrintWriter out;
	static StringTokenizer st;

	static int ni(StringTokenizer st) {
		return Integer.parseInt(st.nextToken());
	}

	static int ni() throws IOException {
		return Integer.parseInt(f.readLine());
	}

	static StringTokenizer nl() throws IOException {
		return new StringTokenizer(f.readLine());
	}

	static int[] nia(int N) throws IOException {
		StringTokenizer st = nl();
		int[] A = new int[N];
		for (int i = 0; i < N; i++)
			A[i] = ni(st);
		return A;
	}

	static void setIn(String s) throws IOException {
		f = new BufferedReader(new FileReader(s));
	}

	static void setOut(String s) throws IOException {
		out = new PrintWriter(new FileWriter(s));
	}

	static void setIn() {
		f = new BufferedReader(new InputStreamReader(System.in));
	}

	static void setOut() {
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	}

	static void setIO(String s) throws IOException {
		setIn(s + ".in");
		setOut(s + ".out");
	}

	static void setIO() {
		setIn();
		setOut();
	}
}
