import java.util.Scanner;

public class Main {
	public static void main(String[] args){

		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;

		try (Scanner scanner = new Scanner(System.in)) {

			int num = scanner.nextInt();

			for (int i = 0; i < num; i++) {

				String s = scanner.next();

				switch (s) {

				case "AC":
					ac++;
					break;

				case "WA":
					wa++;
					break;

				case "TLE":
					tle++;
					break;

				case "RE":
					re++;
					break;

				}
			}

			System.out.println("AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){

		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;

		try (Scanner scanner = new Scanner(System.in)) {

			int num = scanner.nextInt();

			for (int i = 0; i < num; i++) {

				String s = scanner.next();

				switch (s) {

				case "AC":
					ac++;
					break;

				case "WA":
					wa++;
					break;

				case "TLE":
					tle++;
					break;

				case "RE":
					re++;
					break;

				}
			}

			System.out.println("AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re);
		}
	}
} Main public static void main(String[] args){

		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;

		try (Scanner scanner = new Scanner(System.in)) {

			int num = scanner.nextInt();

			for (int i = 0; i < num; i++) {

				String s = scanner.next();

				switch (s) {

				case "AC":
					ac++;
					break;

				case "WA":
					wa++;
					break;

				case "TLE":
					tle++;
					break;

				case "RE":
					re++;
					break;

				}
			}

			System.out.println("AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re);
		}
	} main {

		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;

		try (Scanner scanner = new Scanner(System.in)) {

			int num = scanner.nextInt();

			for (int i = 0; i < num; i++) {

				String s = scanner.next();

				switch (s) {

				case "AC":
					ac++;
					break;

				case "WA":
					wa++;
					break;

				case "TLE":
					tle++;
					break;

				case "RE":
					re++;
					break;

				}
			}

			System.out.println("AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re);
		}
	} int ac = 0; ac 0 int wa = 0; wa 0 int tle = 0; tle 0 int re = 0; re 0 try (Scanner scanner = new Scanner(System.in)) {

			int num = scanner.nextInt();

			for (int i = 0; i < num; i++) {

				String s = scanner.next();

				switch (s) {

				case "AC":
					ac++;
					break;

				case "WA":
					wa++;
					break;

				case "TLE":
					tle++;
					break;

				case "RE":
					re++;
					break;

				}
			}

			System.out.println("AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re);
		} {

			int num = scanner.nextInt();

			for (int i = 0; i < num; i++) {

				String s = scanner.next();

				switch (s) {

				case "AC":
					ac++;
					break;

				case "WA":
					wa++;
					break;

				case "TLE":
					tle++;
					break;

				case "RE":
					re++;
					break;

				}
			}

			System.out.println("AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re);
		} Scanner scanner = new Scanner(System.in) Scanner scanner = new Scanner(System.in) new Scanner(System.in) int num = scanner.nextInt(); num scanner.nextInt() scanner.nextInt scanner for (int i = 0; i < num; i++) {

				String s = scanner.next();

				switch (s) {

				case "AC":
					ac++;
					break;

				case "WA":
					wa++;
					break;

				case "TLE":
					tle++;
					break;

				case "RE":
					re++;
					break;

				}
			} int i = 0; int i = 0; i 0 i < num i num i++ i++ i {

				String s = scanner.next();

				switch (s) {

				case "AC":
					ac++;
					break;

				case "WA":
					wa++;
					break;

				case "TLE":
					tle++;
					break;

				case "RE":
					re++;
					break;

				}
			} {

				String s = scanner.next();

				switch (s) {

				case "AC":
					ac++;
					break;

				case "WA":
					wa++;
					break;

				case "TLE":
					tle++;
					break;

				case "RE":
					re++;
					break;

				}
			} String s = scanner.next(); s scanner.next() scanner.next scanner switch (s) {

				case "AC":
					ac++;
					break;

				case "WA":
					wa++;
					break;

				case "TLE":
					tle++;
					break;

				case "RE":
					re++;
					break;

				} s case "AC": "AC" case "AC": ac++ ac break; case "WA": "WA" case "WA": wa++ wa break; case "TLE": "TLE" case "TLE": tle++ tle break; case "RE": "RE" case "RE": re++ re break; System.out.println("AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re) System.out.println System.out System System.out "AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re "\nRE x " tle "\nTLE x " wa "\nWA x " "AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re "AC x " ac "\nWA x " wa "\nTLE x " tle "\nRE x " re String[] args args public class Main {
	public static void main(String[] args){

		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;

		try (Scanner scanner = new Scanner(System.in)) {

			int num = scanner.nextInt();

			for (int i = 0; i < num; i++) {

				String s = scanner.next();

				switch (s) {

				case "AC":
					ac++;
					break;

				case "WA":
					wa++;
					break;

				case "TLE":
					tle++;
					break;

				case "RE":
					re++;
					break;

				}
			}

			System.out.println("AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re);
		}
	}
} public class Main {
	public static void main(String[] args){

		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;

		try (Scanner scanner = new Scanner(System.in)) {

			int num = scanner.nextInt();

			for (int i = 0; i < num; i++) {

				String s = scanner.next();

				switch (s) {

				case "AC":
					ac++;
					break;

				case "WA":
					wa++;
					break;

				case "TLE":
					tle++;
					break;

				case "RE":
					re++;
					break;

				}
			}

			System.out.println("AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){

		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;

		try (Scanner scanner = new Scanner(System.in)) {

			int num = scanner.nextInt();

			for (int i = 0; i < num; i++) {

				String s = scanner.next();

				switch (s) {

				case "AC":
					ac++;
					break;

				case "WA":
					wa++;
					break;

				case "TLE":
					tle++;
					break;

				case "RE":
					re++;
					break;

				}
			}

			System.out.println("AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re);
		}
	}
}