import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int ac = 0, wa = 0, tle = 0, re = 0;
		int n = in.nextInt();
		for (int i = 0; i < n; i++) {
			String s = in.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.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int ac = 0, wa = 0, tle = 0, re = 0;
		int n = in.nextInt();
		for (int i = 0; i < n; i++) {
			String s = in.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 in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int ac = 0, wa = 0, tle = 0, re = 0;
		int n = in.nextInt();
		for (int i = 0; i < n; i++) {
			String s = in.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 in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int ac = 0, wa = 0, tle = 0, re = 0;
		int n = in.nextInt();
		for (int i = 0; i < n; i++) {
			String s = in.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 in = new Scanner(new BufferedReader(new InputStreamReader(System.in))); in new Scanner(new BufferedReader(new InputStreamReader(System.in))) int ac = 0 ac 0 wa = 0 wa 0 tle = 0 tle 0 re = 0; re 0 int n = in.nextInt(); n in.nextInt() in.nextInt in for (int i = 0; i < n; i++) {
			String s = in.next();
			if (s.equals("AC"))
				ac++;
			else if (s.equals("WA"))
				wa++;
			else if (s.equals("TLE"))
				tle++;
			else if (s.equals("RE"))
				re++;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String s = in.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 = in.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 = in.next(); s in.next() in.next in 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 in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int ac = 0, wa = 0, tle = 0, re = 0;
		int n = in.nextInt();
		for (int i = 0; i < n; i++) {
			String s = in.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 in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int ac = 0, wa = 0, tle = 0, re = 0;
		int n = in.nextInt();
		for (int i = 0; i < n; i++) {
			String s = in.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.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int ac = 0, wa = 0, tle = 0, re = 0;
		int n = in.nextInt();
		for (int i = 0; i < n; i++) {
			String s = in.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);
	}

}
