import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] c = new int[4];
		int n = scan.nextInt();
		while(n-->0) {
			String s = scan.next();
			if(s.equals("AC"))
				c[0]++;
			else if(s.equals("WA"))
				c[1]++;
			else if(s.equals("TLE"))
				c[2]++;
			else 
				c[3]++;
		}
		System.out.println("AC x "+c[0]);
		System.out.println("WA x "+c[1]);
		System.out.println("TLE x "+c[2]);
		System.out.println("RE x "+c[3]);
	}

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] c = new int[4];
		int n = scan.nextInt();
		while(n-->0) {
			String s = scan.next();
			if(s.equals("AC"))
				c[0]++;
			else if(s.equals("WA"))
				c[1]++;
			else if(s.equals("TLE"))
				c[2]++;
			else 
				c[3]++;
		}
		System.out.println("AC x "+c[0]);
		System.out.println("WA x "+c[1]);
		System.out.println("TLE x "+c[2]);
		System.out.println("RE x "+c[3]);
	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] c = new int[4];
		int n = scan.nextInt();
		while(n-->0) {
			String s = scan.next();
			if(s.equals("AC"))
				c[0]++;
			else if(s.equals("WA"))
				c[1]++;
			else if(s.equals("TLE"))
				c[2]++;
			else 
				c[3]++;
		}
		System.out.println("AC x "+c[0]);
		System.out.println("WA x "+c[1]);
		System.out.println("TLE x "+c[2]);
		System.out.println("RE x "+c[3]);
	} main {
		Scanner scan = new Scanner(System.in);
		int[] c = new int[4];
		int n = scan.nextInt();
		while(n-->0) {
			String s = scan.next();
			if(s.equals("AC"))
				c[0]++;
			else if(s.equals("WA"))
				c[1]++;
			else if(s.equals("TLE"))
				c[2]++;
			else 
				c[3]++;
		}
		System.out.println("AC x "+c[0]);
		System.out.println("WA x "+c[1]);
		System.out.println("TLE x "+c[2]);
		System.out.println("RE x "+c[3]);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int[] c = new int[4]; c new int[4] 4 int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan while(n-->0) {
			String s = scan.next();
			if(s.equals("AC"))
				c[0]++;
			else if(s.equals("WA"))
				c[1]++;
			else if(s.equals("TLE"))
				c[2]++;
			else 
				c[3]++;
		} n-->0 n-- n 0 {
			String s = scan.next();
			if(s.equals("AC"))
				c[0]++;
			else if(s.equals("WA"))
				c[1]++;
			else if(s.equals("TLE"))
				c[2]++;
			else 
				c[3]++;
		} String s = scan.next(); s scan.next() scan.next scan if(s.equals("AC"))
				c[0]++;
			else if(s.equals("WA"))
				c[1]++;
			else if(s.equals("TLE"))
				c[2]++;
			else 
				c[3]++; s.equals("AC") s.equals s "AC" c[0]++ c[0] c 0 if(s.equals("WA"))
				c[1]++;
			else if(s.equals("TLE"))
				c[2]++;
			else 
				c[3]++; s.equals("WA") s.equals s "WA" c[1]++ c[1] c 1 if(s.equals("TLE"))
				c[2]++;
			else 
				c[3]++; s.equals("TLE") s.equals s "TLE" c[2]++ c[2] c 2 c[3]++ c[3] c 3 System.out.println("AC x "+c[0]) System.out.println System.out System System.out "AC x "+c[0] "AC x " c[0] c 0 System.out.println("WA x "+c[1]) System.out.println System.out System System.out "WA x "+c[1] "WA x " c[1] c 1 System.out.println("TLE x "+c[2]) System.out.println System.out System System.out "TLE x "+c[2] "TLE x " c[2] c 2 System.out.println("RE x "+c[3]) System.out.println System.out System System.out "RE x "+c[3] "RE x " c[3] c 3 String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] c = new int[4];
		int n = scan.nextInt();
		while(n-->0) {
			String s = scan.next();
			if(s.equals("AC"))
				c[0]++;
			else if(s.equals("WA"))
				c[1]++;
			else if(s.equals("TLE"))
				c[2]++;
			else 
				c[3]++;
		}
		System.out.println("AC x "+c[0]);
		System.out.println("WA x "+c[1]);
		System.out.println("TLE x "+c[2]);
		System.out.println("RE x "+c[3]);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] c = new int[4];
		int n = scan.nextInt();
		while(n-->0) {
			String s = scan.next();
			if(s.equals("AC"))
				c[0]++;
			else if(s.equals("WA"))
				c[1]++;
			else if(s.equals("TLE"))
				c[2]++;
			else 
				c[3]++;
		}
		System.out.println("AC x "+c[0]);
		System.out.println("WA x "+c[1]);
		System.out.println("TLE x "+c[2]);
		System.out.println("RE x "+c[3]);
	}

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int[] c = new int[4];
		int n = scan.nextInt();
		while(n-->0) {
			String s = scan.next();
			if(s.equals("AC"))
				c[0]++;
			else if(s.equals("WA"))
				c[1]++;
			else if(s.equals("TLE"))
				c[2]++;
			else 
				c[3]++;
		}
		System.out.println("AC x "+c[0]);
		System.out.println("WA x "+c[1]);
		System.out.println("TLE x "+c[2]);
		System.out.println("RE x "+c[3]);
	}

}
