import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int number = scanner.nextInt();
		int acCount = 0;
		int waCount = 0;
		int tleCount = 0;
		int reCount = 0;
		while (scanner.hasNext()) {
			String str = scanner.next();
			if (str.equals("AC")) {
				acCount++;
			} else if (str.equals("WA")) {
				waCount++;
			} else if (str.equals("TLE")) {
				tleCount++;
			} else if (str.equals("RE")) {
				reCount++;
			}
		}
		System.out.println("AC x " + acCount);
		System.out.println("WA x " + waCount);
		System.out.println("TLE x " + tleCount);
		System.out.println("RE x " + reCount);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int number = scanner.nextInt();
		int acCount = 0;
		int waCount = 0;
		int tleCount = 0;
		int reCount = 0;
		while (scanner.hasNext()) {
			String str = scanner.next();
			if (str.equals("AC")) {
				acCount++;
			} else if (str.equals("WA")) {
				waCount++;
			} else if (str.equals("TLE")) {
				tleCount++;
			} else if (str.equals("RE")) {
				reCount++;
			}
		}
		System.out.println("AC x " + acCount);
		System.out.println("WA x " + waCount);
		System.out.println("TLE x " + tleCount);
		System.out.println("RE x " + reCount);
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int number = scanner.nextInt();
		int acCount = 0;
		int waCount = 0;
		int tleCount = 0;
		int reCount = 0;
		while (scanner.hasNext()) {
			String str = scanner.next();
			if (str.equals("AC")) {
				acCount++;
			} else if (str.equals("WA")) {
				waCount++;
			} else if (str.equals("TLE")) {
				tleCount++;
			} else if (str.equals("RE")) {
				reCount++;
			}
		}
		System.out.println("AC x " + acCount);
		System.out.println("WA x " + waCount);
		System.out.println("TLE x " + tleCount);
		System.out.println("RE x " + reCount);
	} main {
		Scanner scanner = new Scanner(System.in);
		int number = scanner.nextInt();
		int acCount = 0;
		int waCount = 0;
		int tleCount = 0;
		int reCount = 0;
		while (scanner.hasNext()) {
			String str = scanner.next();
			if (str.equals("AC")) {
				acCount++;
			} else if (str.equals("WA")) {
				waCount++;
			} else if (str.equals("TLE")) {
				tleCount++;
			} else if (str.equals("RE")) {
				reCount++;
			}
		}
		System.out.println("AC x " + acCount);
		System.out.println("WA x " + waCount);
		System.out.println("TLE x " + tleCount);
		System.out.println("RE x " + reCount);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int number = scanner.nextInt(); number scanner.nextInt() scanner.nextInt scanner int acCount = 0; acCount 0 int waCount = 0; waCount 0 int tleCount = 0; tleCount 0 int reCount = 0; reCount 0 while (scanner.hasNext()) {
			String str = scanner.next();
			if (str.equals("AC")) {
				acCount++;
			} else if (str.equals("WA")) {
				waCount++;
			} else if (str.equals("TLE")) {
				tleCount++;
			} else if (str.equals("RE")) {
				reCount++;
			}
		} scanner.hasNext() scanner.hasNext scanner {
			String str = scanner.next();
			if (str.equals("AC")) {
				acCount++;
			} else if (str.equals("WA")) {
				waCount++;
			} else if (str.equals("TLE")) {
				tleCount++;
			} else if (str.equals("RE")) {
				reCount++;
			}
		} String str = scanner.next(); str scanner.next() scanner.next scanner if (str.equals("AC")) {
				acCount++;
			} else if (str.equals("WA")) {
				waCount++;
			} else if (str.equals("TLE")) {
				tleCount++;
			} else if (str.equals("RE")) {
				reCount++;
			} str.equals("AC") str.equals str "AC" {
				acCount++;
			} acCount++ acCount if (str.equals("WA")) {
				waCount++;
			} else if (str.equals("TLE")) {
				tleCount++;
			} else if (str.equals("RE")) {
				reCount++;
			} str.equals("WA") str.equals str "WA" {
				waCount++;
			} waCount++ waCount if (str.equals("TLE")) {
				tleCount++;
			} else if (str.equals("RE")) {
				reCount++;
			} str.equals("TLE") str.equals str "TLE" {
				tleCount++;
			} tleCount++ tleCount if (str.equals("RE")) {
				reCount++;
			} str.equals("RE") str.equals str "RE" {
				reCount++;
			} reCount++ reCount System.out.println("AC x " + acCount) System.out.println System.out System System.out "AC x " + acCount "AC x " acCount System.out.println("WA x " + waCount) System.out.println System.out System System.out "WA x " + waCount "WA x " waCount System.out.println("TLE x " + tleCount) System.out.println System.out System System.out "TLE x " + tleCount "TLE x " tleCount System.out.println("RE x " + reCount) System.out.println System.out System System.out "RE x " + reCount "RE x " reCount String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int number = scanner.nextInt();
		int acCount = 0;
		int waCount = 0;
		int tleCount = 0;
		int reCount = 0;
		while (scanner.hasNext()) {
			String str = scanner.next();
			if (str.equals("AC")) {
				acCount++;
			} else if (str.equals("WA")) {
				waCount++;
			} else if (str.equals("TLE")) {
				tleCount++;
			} else if (str.equals("RE")) {
				reCount++;
			}
		}
		System.out.println("AC x " + acCount);
		System.out.println("WA x " + waCount);
		System.out.println("TLE x " + tleCount);
		System.out.println("RE x " + reCount);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int number = scanner.nextInt();
		int acCount = 0;
		int waCount = 0;
		int tleCount = 0;
		int reCount = 0;
		while (scanner.hasNext()) {
			String str = scanner.next();
			if (str.equals("AC")) {
				acCount++;
			} else if (str.equals("WA")) {
				waCount++;
			} else if (str.equals("TLE")) {
				tleCount++;
			} else if (str.equals("RE")) {
				reCount++;
			}
		}
		System.out.println("AC x " + acCount);
		System.out.println("WA x " + waCount);
		System.out.println("TLE x " + tleCount);
		System.out.println("RE x " + reCount);
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int number = scanner.nextInt();
		int acCount = 0;
		int waCount = 0;
		int tleCount = 0;
		int reCount = 0;
		while (scanner.hasNext()) {
			String str = scanner.next();
			if (str.equals("AC")) {
				acCount++;
			} else if (str.equals("WA")) {
				waCount++;
			} else if (str.equals("TLE")) {
				tleCount++;
			} else if (str.equals("RE")) {
				reCount++;
			}
		}
		System.out.println("AC x " + acCount);
		System.out.println("WA x " + waCount);
		System.out.println("TLE x " + tleCount);
		System.out.println("RE x " + reCount);
	}
}
