

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		int ac = 0;
		int wa = 0;
		int tle = 0;


		for(int i = 0; i < N; i++) {
			String s = sc.next();
			if(s.equals("AC"))
				++ac;
			if(s.equals("WA"))
				++wa;
			if(s.equals("TLE"))
				++tle;
		}
		
		System.out.println("AC x " + ac);
		System.out.println("WA x " + wa);
		System.out.println("TLE x " + tle);
		System.out.println("RE x " + (N - ac - wa - tle));
		
	}

} 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();
		
		int ac = 0;
		int wa = 0;
		int tle = 0;


		for(int i = 0; i < N; i++) {
			String s = sc.next();
			if(s.equals("AC"))
				++ac;
			if(s.equals("WA"))
				++wa;
			if(s.equals("TLE"))
				++tle;
		}
		
		System.out.println("AC x " + ac);
		System.out.println("WA x " + wa);
		System.out.println("TLE x " + tle);
		System.out.println("RE x " + (N - ac - wa - tle));
		
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		int ac = 0;
		int wa = 0;
		int tle = 0;


		for(int i = 0; i < N; i++) {
			String s = sc.next();
			if(s.equals("AC"))
				++ac;
			if(s.equals("WA"))
				++wa;
			if(s.equals("TLE"))
				++tle;
		}
		
		System.out.println("AC x " + ac);
		System.out.println("WA x " + wa);
		System.out.println("TLE x " + tle);
		System.out.println("RE x " + (N - ac - wa - tle));
		
	} main {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		int ac = 0;
		int wa = 0;
		int tle = 0;


		for(int i = 0; i < N; i++) {
			String s = sc.next();
			if(s.equals("AC"))
				++ac;
			if(s.equals("WA"))
				++wa;
			if(s.equals("TLE"))
				++tle;
		}
		
		System.out.println("AC x " + ac);
		System.out.println("WA x " + wa);
		System.out.println("TLE x " + tle);
		System.out.println("RE x " + (N - ac - wa - tle));
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int ac = 0; ac 0 int wa = 0; wa 0 int tle = 0; tle 0 for(int i = 0; i < N; i++) {
			String s = sc.next();
			if(s.equals("AC"))
				++ac;
			if(s.equals("WA"))
				++wa;
			if(s.equals("TLE"))
				++tle;
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			String s = sc.next();
			if(s.equals("AC"))
				++ac;
			if(s.equals("WA"))
				++wa;
			if(s.equals("TLE"))
				++tle;
		} {
			String s = sc.next();
			if(s.equals("AC"))
				++ac;
			if(s.equals("WA"))
				++wa;
			if(s.equals("TLE"))
				++tle;
		} String s = sc.next(); s sc.next() sc.next sc if(s.equals("AC"))
				++ac; s.equals("AC") s.equals s "AC" ++ac ac if(s.equals("WA"))
				++wa; s.equals("WA") s.equals s "WA" ++wa wa if(s.equals("TLE"))
				++tle; s.equals("TLE") s.equals s "TLE" ++tle tle 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 " + (N - ac - wa - tle)) System.out.println System.out System System.out "RE x " + (N - ac - wa - tle) "RE x " (N - ac - wa - tle) wa N - ac - wa - tle N ac wa tle String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		int ac = 0;
		int wa = 0;
		int tle = 0;


		for(int i = 0; i < N; i++) {
			String s = sc.next();
			if(s.equals("AC"))
				++ac;
			if(s.equals("WA"))
				++wa;
			if(s.equals("TLE"))
				++tle;
		}
		
		System.out.println("AC x " + ac);
		System.out.println("WA x " + wa);
		System.out.println("TLE x " + tle);
		System.out.println("RE x " + (N - ac - wa - tle));
		
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		int ac = 0;
		int wa = 0;
		int tle = 0;


		for(int i = 0; i < N; i++) {
			String s = sc.next();
			if(s.equals("AC"))
				++ac;
			if(s.equals("WA"))
				++wa;
			if(s.equals("TLE"))
				++tle;
		}
		
		System.out.println("AC x " + ac);
		System.out.println("WA x " + wa);
		System.out.println("TLE x " + tle);
		System.out.println("RE x " + (N - ac - wa - tle));
		
	}

} Main


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		int ac = 0;
		int wa = 0;
		int tle = 0;


		for(int i = 0; i < N; i++) {
			String s = sc.next();
			if(s.equals("AC"))
				++ac;
			if(s.equals("WA"))
				++wa;
			if(s.equals("TLE"))
				++tle;
		}
		
		System.out.println("AC x " + ac);
		System.out.println("WA x " + wa);
		System.out.println("TLE x " + tle);
		System.out.println("RE x " + (N - ac - wa - tle));
		
	}

}
