

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];
		for (int i = 0; i < n; i++) {
			s[i] = sc.next();
		}
		int[] ans = new int[4];
		for (int i = 0; i < n; i++) {
			if (s[i].equals("AC"))
				ans[0]++;
			if (s[i].equals("WA"))
				ans[1]++;
			if (s[i].equals("TLE"))
				ans[2]++;
			if (s[i].equals("RE"))
				ans[3]++;
		}

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

	}

} 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];
		for (int i = 0; i < n; i++) {
			s[i] = sc.next();
		}
		int[] ans = new int[4];
		for (int i = 0; i < n; i++) {
			if (s[i].equals("AC"))
				ans[0]++;
			if (s[i].equals("WA"))
				ans[1]++;
			if (s[i].equals("TLE"))
				ans[2]++;
			if (s[i].equals("RE"))
				ans[3]++;
		}

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

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		String[] s = new String[n];
		for (int i = 0; i < n; i++) {
			s[i] = sc.next();
		}
		int[] ans = new int[4];
		for (int i = 0; i < n; i++) {
			if (s[i].equals("AC"))
				ans[0]++;
			if (s[i].equals("WA"))
				ans[1]++;
			if (s[i].equals("TLE"))
				ans[2]++;
			if (s[i].equals("RE"))
				ans[3]++;
		}

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

	} main {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		String[] s = new String[n];
		for (int i = 0; i < n; i++) {
			s[i] = sc.next();
		}
		int[] ans = new int[4];
		for (int i = 0; i < n; i++) {
			if (s[i].equals("AC"))
				ans[0]++;
			if (s[i].equals("WA"))
				ans[1]++;
			if (s[i].equals("TLE"))
				ans[2]++;
			if (s[i].equals("RE"))
				ans[3]++;
		}

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

	} 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 for (int i = 0; i < n; i++) {
			s[i] = sc.next();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			s[i] = sc.next();
		} {
			s[i] = sc.next();
		} s[i] = sc.next() s[i] s i sc.next() sc.next sc int[] ans = new int[4]; ans new int[4] 4 for (int i = 0; i < n; i++) {
			if (s[i].equals("AC"))
				ans[0]++;
			if (s[i].equals("WA"))
				ans[1]++;
			if (s[i].equals("TLE"))
				ans[2]++;
			if (s[i].equals("RE"))
				ans[3]++;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			if (s[i].equals("AC"))
				ans[0]++;
			if (s[i].equals("WA"))
				ans[1]++;
			if (s[i].equals("TLE"))
				ans[2]++;
			if (s[i].equals("RE"))
				ans[3]++;
		} {
			if (s[i].equals("AC"))
				ans[0]++;
			if (s[i].equals("WA"))
				ans[1]++;
			if (s[i].equals("TLE"))
				ans[2]++;
			if (s[i].equals("RE"))
				ans[3]++;
		} if (s[i].equals("AC"))
				ans[0]++; s[i].equals("AC") s[i].equals s[i] s i "AC" ans[0]++ ans[0] ans 0 if (s[i].equals("WA"))
				ans[1]++; s[i].equals("WA") s[i].equals s[i] s i "WA" ans[1]++ ans[1] ans 1 if (s[i].equals("TLE"))
				ans[2]++; s[i].equals("TLE") s[i].equals s[i] s i "TLE" ans[2]++ ans[2] ans 2 if (s[i].equals("RE"))
				ans[3]++; s[i].equals("RE") s[i].equals s[i] s i "RE" ans[3]++ ans[3] ans 3 System.out.println("AC x " + ans[0]) System.out.println System.out System System.out "AC x " + ans[0] "AC x " ans[0] ans 0 System.out.println("WA x " + ans[1]) System.out.println System.out System System.out "WA x " + ans[1] "WA x " ans[1] ans 1 System.out.println("TLE x " + ans[2]) System.out.println System.out System System.out "TLE x " + ans[2] "TLE x " ans[2] ans 2 System.out.println("RE x " + ans[3]) System.out.println System.out System System.out "RE x " + ans[3] "RE x " ans[3] ans 3 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];
		for (int i = 0; i < n; i++) {
			s[i] = sc.next();
		}
		int[] ans = new int[4];
		for (int i = 0; i < n; i++) {
			if (s[i].equals("AC"))
				ans[0]++;
			if (s[i].equals("WA"))
				ans[1]++;
			if (s[i].equals("TLE"))
				ans[2]++;
			if (s[i].equals("RE"))
				ans[3]++;
		}

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

	}

} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		String[] s = new String[n];
		for (int i = 0; i < n; i++) {
			s[i] = sc.next();
		}
		int[] ans = new int[4];
		for (int i = 0; i < n; i++) {
			if (s[i].equals("AC"))
				ans[0]++;
			if (s[i].equals("WA"))
				ans[1]++;
			if (s[i].equals("TLE"))
				ans[2]++;
			if (s[i].equals("RE"))
				ans[3]++;
		}

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

	}

} Main


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];
		for (int i = 0; i < n; i++) {
			s[i] = sc.next();
		}
		int[] ans = new int[4];
		for (int i = 0; i < n; i++) {
			if (s[i].equals("AC"))
				ans[0]++;
			if (s[i].equals("WA"))
				ans[1]++;
			if (s[i].equals("TLE"))
				ans[2]++;
			if (s[i].equals("RE"))
				ans[3]++;
		}

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

	}

}
