import java.util.*;
import java.io.*;
import java.lang.*;

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; int RE = 0;
		while (n-- > 0) {
			String s = sc.next();
			if (s.equals("AC")) 
				AC++;
			else if (s.equals("WA"))
				WA++;
			else if (s.equals("TLE"))
				TLE++;
			else if (s.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.*; util.* java import java.io.*; io.* java import java.lang.*; lang.* java 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; int RE = 0;
		while (n-- > 0) {
			String s = sc.next();
			if (s.equals("AC")) 
				AC++;
			else if (s.equals("WA"))
				WA++;
			else if (s.equals("TLE"))
				TLE++;
			else if (s.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 sc = new Scanner(System.in);
		int n = sc.nextInt();
		int AC = 0; int WA = 0; int TLE = 0; int RE = 0;
		while (n-- > 0) {
			String s = sc.next();
			if (s.equals("AC")) 
				AC++;
			else if (s.equals("WA"))
				WA++;
			else if (s.equals("TLE"))
				TLE++;
			else if (s.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 sc = new Scanner(System.in);
		int n = sc.nextInt();
		int AC = 0; int WA = 0; int TLE = 0; int RE = 0;
		while (n-- > 0) {
			String s = sc.next();
			if (s.equals("AC")) 
				AC++;
			else if (s.equals("WA"))
				WA++;
			else if (s.equals("TLE"))
				TLE++;
			else if (s.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 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 int RE = 0; RE 0 while (n-- > 0) {
			String s = sc.next();
			if (s.equals("AC")) 
				AC++;
			else if (s.equals("WA"))
				WA++;
			else if (s.equals("TLE"))
				TLE++;
			else if (s.equals("RE"))
				RE++;
		} n-- > 0 n-- n 0 {
			String s = sc.next();
			if (s.equals("AC")) 
				AC++;
			else if (s.equals("WA"))
				WA++;
			else if (s.equals("TLE"))
				TLE++;
			else if (s.equals("RE"))
				RE++;
		} String s = sc.next(); s sc.next() sc.next sc if (s.equals("AC")) 
				AC++;
			else if (s.equals("WA"))
				WA++;
			else if (s.equals("TLE"))
				TLE++;
			else if (s.equals("RE"))
				RE++; s.equals("AC") s.equals s "AC" AC++ AC if (s.equals("WA"))
				WA++;
			else if (s.equals("TLE"))
				TLE++;
			else if (s.equals("RE"))
				RE++; s.equals("WA") s.equals s "WA" WA++ WA if (s.equals("TLE"))
				TLE++;
			else if (s.equals("RE"))
				RE++; s.equals("TLE") s.equals s "TLE" TLE++ TLE if (s.equals("RE"))
				RE++; s.equals("RE") s.equals s "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 sc = new Scanner(System.in);
		int n = sc.nextInt();
		int AC = 0; int WA = 0; int TLE = 0; int RE = 0;
		while (n-- > 0) {
			String s = sc.next();
			if (s.equals("AC")) 
				AC++;
			else if (s.equals("WA"))
				WA++;
			else if (s.equals("TLE"))
				TLE++;
			else if (s.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 sc = new Scanner(System.in);
		int n = sc.nextInt();
		int AC = 0; int WA = 0; int TLE = 0; int RE = 0;
		while (n-- > 0) {
			String s = sc.next();
			if (s.equals("AC")) 
				AC++;
			else if (s.equals("WA"))
				WA++;
			else if (s.equals("TLE"))
				TLE++;
			else if (s.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.*;
import java.io.*;
import java.lang.*;

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; int RE = 0;
		while (n-- > 0) {
			String s = sc.next();
			if (s.equals("AC")) 
				AC++;
			else if (s.equals("WA"))
				WA++;
			else if (s.equals("TLE"))
				TLE++;
			else if (s.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);

	}
}
