import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		String[] array = new String[A];

		for (int i = 0; i < array.length; i++) {
			array[i] = scan.next();
		}

		int AC = 0;
		int WA = 0;
		int TLE = 0;
		int RE = 0;

		for (int j = 0; j < A; j++) {
			if (array[j].equals("AC")) {
				AC++;
			} else if (array[j].equals("WA")) {
				WA++;
			} else if (array[j] .equals("TLE")) {
				TLE++;
			} else if (array[j] .equals("RE")) {
				RE++;
			}
		}

		System.out.println("AC x "+AC);
		System.out.println("WA x "+WA);
		System.out.println("TLE x "+TLE);
		System.out.println("RE x "+RE);

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		String[] array = new String[A];

		for (int i = 0; i < array.length; i++) {
			array[i] = scan.next();
		}

		int AC = 0;
		int WA = 0;
		int TLE = 0;
		int RE = 0;

		for (int j = 0; j < A; j++) {
			if (array[j].equals("AC")) {
				AC++;
			} else if (array[j].equals("WA")) {
				WA++;
			} else if (array[j] .equals("TLE")) {
				TLE++;
			} else if (array[j] .equals("RE")) {
				RE++;
			}
		}

		System.out.println("AC x "+AC);
		System.out.println("WA x "+WA);
		System.out.println("TLE x "+TLE);
		System.out.println("RE x "+RE);

	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		String[] array = new String[A];

		for (int i = 0; i < array.length; i++) {
			array[i] = scan.next();
		}

		int AC = 0;
		int WA = 0;
		int TLE = 0;
		int RE = 0;

		for (int j = 0; j < A; j++) {
			if (array[j].equals("AC")) {
				AC++;
			} else if (array[j].equals("WA")) {
				WA++;
			} else if (array[j] .equals("TLE")) {
				TLE++;
			} else if (array[j] .equals("RE")) {
				RE++;
			}
		}

		System.out.println("AC x "+AC);
		System.out.println("WA x "+WA);
		System.out.println("TLE x "+TLE);
		System.out.println("RE x "+RE);

	} main {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		String[] array = new String[A];

		for (int i = 0; i < array.length; i++) {
			array[i] = scan.next();
		}

		int AC = 0;
		int WA = 0;
		int TLE = 0;
		int RE = 0;

		for (int j = 0; j < A; j++) {
			if (array[j].equals("AC")) {
				AC++;
			} else if (array[j].equals("WA")) {
				WA++;
			} else if (array[j] .equals("TLE")) {
				TLE++;
			} else if (array[j] .equals("RE")) {
				RE++;
			}
		}

		System.out.println("AC x "+AC);
		System.out.println("WA x "+WA);
		System.out.println("TLE x "+TLE);
		System.out.println("RE x "+RE);

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int A = scan.nextInt(); A scan.nextInt() scan.nextInt scan String[] array = new String[A]; array new String[A] A for (int i = 0; i < array.length; i++) {
			array[i] = scan.next();
		} int i = 0; int i = 0; i 0 i < array.length i array.length array array.length i++ i++ i {
			array[i] = scan.next();
		} {
			array[i] = scan.next();
		} array[i] = scan.next() array[i] array i scan.next() scan.next scan int AC = 0; AC 0 int WA = 0; WA 0 int TLE = 0; TLE 0 int RE = 0; RE 0 for (int j = 0; j < A; j++) {
			if (array[j].equals("AC")) {
				AC++;
			} else if (array[j].equals("WA")) {
				WA++;
			} else if (array[j] .equals("TLE")) {
				TLE++;
			} else if (array[j] .equals("RE")) {
				RE++;
			}
		} int j = 0; int j = 0; j 0 j < A j A j++ j++ j {
			if (array[j].equals("AC")) {
				AC++;
			} else if (array[j].equals("WA")) {
				WA++;
			} else if (array[j] .equals("TLE")) {
				TLE++;
			} else if (array[j] .equals("RE")) {
				RE++;
			}
		} {
			if (array[j].equals("AC")) {
				AC++;
			} else if (array[j].equals("WA")) {
				WA++;
			} else if (array[j] .equals("TLE")) {
				TLE++;
			} else if (array[j] .equals("RE")) {
				RE++;
			}
		} if (array[j].equals("AC")) {
				AC++;
			} else if (array[j].equals("WA")) {
				WA++;
			} else if (array[j] .equals("TLE")) {
				TLE++;
			} else if (array[j] .equals("RE")) {
				RE++;
			} array[j].equals("AC") array[j].equals array[j] array j "AC" {
				AC++;
			} AC++ AC if (array[j].equals("WA")) {
				WA++;
			} else if (array[j] .equals("TLE")) {
				TLE++;
			} else if (array[j] .equals("RE")) {
				RE++;
			} array[j].equals("WA") array[j].equals array[j] array j "WA" {
				WA++;
			} WA++ WA if (array[j] .equals("TLE")) {
				TLE++;
			} else if (array[j] .equals("RE")) {
				RE++;
			} array[j] .equals("TLE") array[j] .equals array[j] array j "TLE" {
				TLE++;
			} TLE++ TLE if (array[j] .equals("RE")) {
				RE++;
			} array[j] .equals("RE") array[j] .equals array[j] array j "RE" {
				RE++;
			} RE++ RE System.out.println("AC x "+AC) System.out.println System.out System System.out "AC x "+AC "AC x " AC System.out.println("WA x "+WA) System.out.println System.out System System.out "WA x "+WA "WA x " WA System.out.println("TLE x "+TLE) System.out.println System.out System System.out "TLE x "+TLE "TLE x " TLE System.out.println("RE x "+RE) System.out.println System.out System System.out "RE x "+RE "RE x " RE String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		String[] array = new String[A];

		for (int i = 0; i < array.length; i++) {
			array[i] = scan.next();
		}

		int AC = 0;
		int WA = 0;
		int TLE = 0;
		int RE = 0;

		for (int j = 0; j < A; j++) {
			if (array[j].equals("AC")) {
				AC++;
			} else if (array[j].equals("WA")) {
				WA++;
			} else if (array[j] .equals("TLE")) {
				TLE++;
			} else if (array[j] .equals("RE")) {
				RE++;
			}
		}

		System.out.println("AC x "+AC);
		System.out.println("WA x "+WA);
		System.out.println("TLE x "+TLE);
		System.out.println("RE x "+RE);

	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		String[] array = new String[A];

		for (int i = 0; i < array.length; i++) {
			array[i] = scan.next();
		}

		int AC = 0;
		int WA = 0;
		int TLE = 0;
		int RE = 0;

		for (int j = 0; j < A; j++) {
			if (array[j].equals("AC")) {
				AC++;
			} else if (array[j].equals("WA")) {
				WA++;
			} else if (array[j] .equals("TLE")) {
				TLE++;
			} else if (array[j] .equals("RE")) {
				RE++;
			}
		}

		System.out.println("AC x "+AC);
		System.out.println("WA x "+WA);
		System.out.println("TLE x "+TLE);
		System.out.println("RE x "+RE);

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		String[] array = new String[A];

		for (int i = 0; i < array.length; i++) {
			array[i] = scan.next();
		}

		int AC = 0;
		int WA = 0;
		int TLE = 0;
		int RE = 0;

		for (int j = 0; j < A; j++) {
			if (array[j].equals("AC")) {
				AC++;
			} else if (array[j].equals("WA")) {
				WA++;
			} else if (array[j] .equals("TLE")) {
				TLE++;
			} else if (array[j] .equals("RE")) {
				RE++;
			}
		}

		System.out.println("AC x "+AC);
		System.out.println("WA x "+WA);
		System.out.println("TLE x "+TLE);
		System.out.println("RE x "+RE);

	}

}