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

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int numAC = 0;
		int numWA = 0;
		int numTLE = 0;
		int numRE = 0;

		int n = in.nextInt();
		while (n-- > 0) {
			String s = in.next();
			if (s.equals("AC"))
				numAC++;
			else if (s.equals("WA"))
				numWA++;
			else if (s.equals("TLE"))
				numTLE++;
			else
				numRE++;
		}

		System.out.println("AC x " + numAC);
		System.out.println("WA x " + numWA);
		System.out.println("TLE x " + numTLE);
		System.out.println("RE x " + numRE);
	}
}
 import java.io.*; io.* java import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int numAC = 0;
		int numWA = 0;
		int numTLE = 0;
		int numRE = 0;

		int n = in.nextInt();
		while (n-- > 0) {
			String s = in.next();
			if (s.equals("AC"))
				numAC++;
			else if (s.equals("WA"))
				numWA++;
			else if (s.equals("TLE"))
				numTLE++;
			else
				numRE++;
		}

		System.out.println("AC x " + numAC);
		System.out.println("WA x " + numWA);
		System.out.println("TLE x " + numTLE);
		System.out.println("RE x " + numRE);
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int numAC = 0;
		int numWA = 0;
		int numTLE = 0;
		int numRE = 0;

		int n = in.nextInt();
		while (n-- > 0) {
			String s = in.next();
			if (s.equals("AC"))
				numAC++;
			else if (s.equals("WA"))
				numWA++;
			else if (s.equals("TLE"))
				numTLE++;
			else
				numRE++;
		}

		System.out.println("AC x " + numAC);
		System.out.println("WA x " + numWA);
		System.out.println("TLE x " + numTLE);
		System.out.println("RE x " + numRE);
	} main {
		Scanner in = new Scanner(System.in);

		int numAC = 0;
		int numWA = 0;
		int numTLE = 0;
		int numRE = 0;

		int n = in.nextInt();
		while (n-- > 0) {
			String s = in.next();
			if (s.equals("AC"))
				numAC++;
			else if (s.equals("WA"))
				numWA++;
			else if (s.equals("TLE"))
				numTLE++;
			else
				numRE++;
		}

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

		int numAC = 0;
		int numWA = 0;
		int numTLE = 0;
		int numRE = 0;

		int n = in.nextInt();
		while (n-- > 0) {
			String s = in.next();
			if (s.equals("AC"))
				numAC++;
			else if (s.equals("WA"))
				numWA++;
			else if (s.equals("TLE"))
				numTLE++;
			else
				numRE++;
		}

		System.out.println("AC x " + numAC);
		System.out.println("WA x " + numWA);
		System.out.println("TLE x " + numTLE);
		System.out.println("RE x " + numRE);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int numAC = 0;
		int numWA = 0;
		int numTLE = 0;
		int numRE = 0;

		int n = in.nextInt();
		while (n-- > 0) {
			String s = in.next();
			if (s.equals("AC"))
				numAC++;
			else if (s.equals("WA"))
				numWA++;
			else if (s.equals("TLE"))
				numTLE++;
			else
				numRE++;
		}

		System.out.println("AC x " + numAC);
		System.out.println("WA x " + numWA);
		System.out.println("TLE x " + numTLE);
		System.out.println("RE x " + numRE);
	}
} Main
import java.io.*;
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);

		int numAC = 0;
		int numWA = 0;
		int numTLE = 0;
		int numRE = 0;

		int n = in.nextInt();
		while (n-- > 0) {
			String s = in.next();
			if (s.equals("AC"))
				numAC++;
			else if (s.equals("WA"))
				numWA++;
			else if (s.equals("TLE"))
				numTLE++;
			else
				numRE++;
		}

		System.out.println("AC x " + numAC);
		System.out.println("WA x " + numWA);
		System.out.println("TLE x " + numTLE);
		System.out.println("RE x " + numRE);
	}
}

