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;
		Scanner scan = new Scanner(System.in);
		String array[] = new String[scan.nextInt()];
		for(int i=0;i < array.length;i++) {
			array[i] = scan.next();
			if(array[i].equals("AC")) {
				ac += 1;
			}else if(array[i].equals("WA")) {
				wa += 1;
			}else if(array[i].equals("TLE")) {
				tle += 1;
			}else if(array[i].equals("RE")) {
				re += 1;
			}
		}
		System.out.println("AC x "+ac);
		System.out.println("WA x "+wa);
		System.out.println("TLE x "+tle);
		System.out.println("RE x "+re);

		scan.close();
	}
} 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;
		Scanner scan = new Scanner(System.in);
		String array[] = new String[scan.nextInt()];
		for(int i=0;i < array.length;i++) {
			array[i] = scan.next();
			if(array[i].equals("AC")) {
				ac += 1;
			}else if(array[i].equals("WA")) {
				wa += 1;
			}else if(array[i].equals("TLE")) {
				tle += 1;
			}else if(array[i].equals("RE")) {
				re += 1;
			}
		}
		System.out.println("AC x "+ac);
		System.out.println("WA x "+wa);
		System.out.println("TLE x "+tle);
		System.out.println("RE x "+re);

		scan.close();
	}
} Main public static void main(String[] args) {
		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;
		Scanner scan = new Scanner(System.in);
		String array[] = new String[scan.nextInt()];
		for(int i=0;i < array.length;i++) {
			array[i] = scan.next();
			if(array[i].equals("AC")) {
				ac += 1;
			}else if(array[i].equals("WA")) {
				wa += 1;
			}else if(array[i].equals("TLE")) {
				tle += 1;
			}else if(array[i].equals("RE")) {
				re += 1;
			}
		}
		System.out.println("AC x "+ac);
		System.out.println("WA x "+wa);
		System.out.println("TLE x "+tle);
		System.out.println("RE x "+re);

		scan.close();
	} main {
		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;
		Scanner scan = new Scanner(System.in);
		String array[] = new String[scan.nextInt()];
		for(int i=0;i < array.length;i++) {
			array[i] = scan.next();
			if(array[i].equals("AC")) {
				ac += 1;
			}else if(array[i].equals("WA")) {
				wa += 1;
			}else if(array[i].equals("TLE")) {
				tle += 1;
			}else if(array[i].equals("RE")) {
				re += 1;
			}
		}
		System.out.println("AC x "+ac);
		System.out.println("WA x "+wa);
		System.out.println("TLE x "+tle);
		System.out.println("RE x "+re);

		scan.close();
	} int ac = 0; ac 0 int wa = 0; wa 0 int tle = 0; tle 0 int re = 0; re 0 Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String array[] = new String[scan.nextInt()]; array new String[scan.nextInt()] scan.nextInt() scan.nextInt scan for(int i=0;i < array.length;i++) {
			array[i] = scan.next();
			if(array[i].equals("AC")) {
				ac += 1;
			}else if(array[i].equals("WA")) {
				wa += 1;
			}else if(array[i].equals("TLE")) {
				tle += 1;
			}else if(array[i].equals("RE")) {
				re += 1;
			}
		} int i=0; int i=0; i 0 i < array.length i array.length array array.length i++ i++ i {
			array[i] = scan.next();
			if(array[i].equals("AC")) {
				ac += 1;
			}else if(array[i].equals("WA")) {
				wa += 1;
			}else if(array[i].equals("TLE")) {
				tle += 1;
			}else if(array[i].equals("RE")) {
				re += 1;
			}
		} {
			array[i] = scan.next();
			if(array[i].equals("AC")) {
				ac += 1;
			}else if(array[i].equals("WA")) {
				wa += 1;
			}else if(array[i].equals("TLE")) {
				tle += 1;
			}else if(array[i].equals("RE")) {
				re += 1;
			}
		} array[i] = scan.next() array[i] array i scan.next() scan.next scan if(array[i].equals("AC")) {
				ac += 1;
			}else if(array[i].equals("WA")) {
				wa += 1;
			}else if(array[i].equals("TLE")) {
				tle += 1;
			}else if(array[i].equals("RE")) {
				re += 1;
			} array[i].equals("AC") array[i].equals array[i] array i "AC" {
				ac += 1;
			} ac += 1 ac 1 if(array[i].equals("WA")) {
				wa += 1;
			}else if(array[i].equals("TLE")) {
				tle += 1;
			}else if(array[i].equals("RE")) {
				re += 1;
			} array[i].equals("WA") array[i].equals array[i] array i "WA" {
				wa += 1;
			} wa += 1 wa 1 if(array[i].equals("TLE")) {
				tle += 1;
			}else if(array[i].equals("RE")) {
				re += 1;
			} array[i].equals("TLE") array[i].equals array[i] array i "TLE" {
				tle += 1;
			} tle += 1 tle 1 if(array[i].equals("RE")) {
				re += 1;
			} array[i].equals("RE") array[i].equals array[i] array i "RE" {
				re += 1;
			} re += 1 re 1 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 scan.close() scan.close scan String[] args args public class Main{
	public static void main(String[] args) {
		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;
		Scanner scan = new Scanner(System.in);
		String array[] = new String[scan.nextInt()];
		for(int i=0;i < array.length;i++) {
			array[i] = scan.next();
			if(array[i].equals("AC")) {
				ac += 1;
			}else if(array[i].equals("WA")) {
				wa += 1;
			}else if(array[i].equals("TLE")) {
				tle += 1;
			}else if(array[i].equals("RE")) {
				re += 1;
			}
		}
		System.out.println("AC x "+ac);
		System.out.println("WA x "+wa);
		System.out.println("TLE x "+tle);
		System.out.println("RE x "+re);

		scan.close();
	}
} public class Main{
	public static void main(String[] args) {
		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;
		Scanner scan = new Scanner(System.in);
		String array[] = new String[scan.nextInt()];
		for(int i=0;i < array.length;i++) {
			array[i] = scan.next();
			if(array[i].equals("AC")) {
				ac += 1;
			}else if(array[i].equals("WA")) {
				wa += 1;
			}else if(array[i].equals("TLE")) {
				tle += 1;
			}else if(array[i].equals("RE")) {
				re += 1;
			}
		}
		System.out.println("AC x "+ac);
		System.out.println("WA x "+wa);
		System.out.println("TLE x "+tle);
		System.out.println("RE x "+re);

		scan.close();
	}
} 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;
		Scanner scan = new Scanner(System.in);
		String array[] = new String[scan.nextInt()];
		for(int i=0;i < array.length;i++) {
			array[i] = scan.next();
			if(array[i].equals("AC")) {
				ac += 1;
			}else if(array[i].equals("WA")) {
				wa += 1;
			}else if(array[i].equals("TLE")) {
				tle += 1;
			}else if(array[i].equals("RE")) {
				re += 1;
			}
		}
		System.out.println("AC x "+ac);
		System.out.println("WA x "+wa);
		System.out.println("TLE x "+tle);
		System.out.println("RE x "+re);

		scan.close();
	}
}