import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		int c1 = 0;
		int c2 = 0;
		int c3 = 0;
		int c4 = 0;
		for (int i = 0; i < n; i++) {
			String s = kb.next();
			if (s.equals("AC")) {
				c1 += 1;
			} else if (s.equals("WA")) {
				c2 += 1;
			} else if (s.equals("TLE")) {
				c3 += 1;
			} else {
				c4 += 1;
			}
		}
		System.out.println("AC x " + c1 + "\nWA x " + c2 + "\nTLE x " + c3 + "\nRE x " + c4);
		kb.close();
	}

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

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		int c1 = 0;
		int c2 = 0;
		int c3 = 0;
		int c4 = 0;
		for (int i = 0; i < n; i++) {
			String s = kb.next();
			if (s.equals("AC")) {
				c1 += 1;
			} else if (s.equals("WA")) {
				c2 += 1;
			} else if (s.equals("TLE")) {
				c3 += 1;
			} else {
				c4 += 1;
			}
		}
		System.out.println("AC x " + c1 + "\nWA x " + c2 + "\nTLE x " + c3 + "\nRE x " + c4);
		kb.close();
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		int c1 = 0;
		int c2 = 0;
		int c3 = 0;
		int c4 = 0;
		for (int i = 0; i < n; i++) {
			String s = kb.next();
			if (s.equals("AC")) {
				c1 += 1;
			} else if (s.equals("WA")) {
				c2 += 1;
			} else if (s.equals("TLE")) {
				c3 += 1;
			} else {
				c4 += 1;
			}
		}
		System.out.println("AC x " + c1 + "\nWA x " + c2 + "\nTLE x " + c3 + "\nRE x " + c4);
		kb.close();
	} main {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		int c1 = 0;
		int c2 = 0;
		int c3 = 0;
		int c4 = 0;
		for (int i = 0; i < n; i++) {
			String s = kb.next();
			if (s.equals("AC")) {
				c1 += 1;
			} else if (s.equals("WA")) {
				c2 += 1;
			} else if (s.equals("TLE")) {
				c3 += 1;
			} else {
				c4 += 1;
			}
		}
		System.out.println("AC x " + c1 + "\nWA x " + c2 + "\nTLE x " + c3 + "\nRE x " + c4);
		kb.close();
	} Scanner kb = new Scanner(System.in); kb new Scanner(System.in) int n = kb.nextInt(); n kb.nextInt() kb.nextInt kb int c1 = 0; c1 0 int c2 = 0; c2 0 int c3 = 0; c3 0 int c4 = 0; c4 0 for (int i = 0; i < n; i++) {
			String s = kb.next();
			if (s.equals("AC")) {
				c1 += 1;
			} else if (s.equals("WA")) {
				c2 += 1;
			} else if (s.equals("TLE")) {
				c3 += 1;
			} else {
				c4 += 1;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String s = kb.next();
			if (s.equals("AC")) {
				c1 += 1;
			} else if (s.equals("WA")) {
				c2 += 1;
			} else if (s.equals("TLE")) {
				c3 += 1;
			} else {
				c4 += 1;
			}
		} {
			String s = kb.next();
			if (s.equals("AC")) {
				c1 += 1;
			} else if (s.equals("WA")) {
				c2 += 1;
			} else if (s.equals("TLE")) {
				c3 += 1;
			} else {
				c4 += 1;
			}
		} String s = kb.next(); s kb.next() kb.next kb if (s.equals("AC")) {
				c1 += 1;
			} else if (s.equals("WA")) {
				c2 += 1;
			} else if (s.equals("TLE")) {
				c3 += 1;
			} else {
				c4 += 1;
			} s.equals("AC") s.equals s "AC" {
				c1 += 1;
			} c1 += 1 c1 1 if (s.equals("WA")) {
				c2 += 1;
			} else if (s.equals("TLE")) {
				c3 += 1;
			} else {
				c4 += 1;
			} s.equals("WA") s.equals s "WA" {
				c2 += 1;
			} c2 += 1 c2 1 if (s.equals("TLE")) {
				c3 += 1;
			} else {
				c4 += 1;
			} s.equals("TLE") s.equals s "TLE" {
				c3 += 1;
			} c3 += 1 c3 1 {
				c4 += 1;
			} c4 += 1 c4 1 System.out.println("AC x " + c1 + "\nWA x " + c2 + "\nTLE x " + c3 + "\nRE x " + c4) System.out.println System.out System System.out "AC x " + c1 + "\nWA x " + c2 + "\nTLE x " + c3 + "\nRE x " + c4 "\nRE x " c3 "\nTLE x " c2 "\nWA x " "AC x " + c1 + "\nWA x " + c2 + "\nTLE x " + c3 + "\nRE x " + c4 "AC x " c1 "\nWA x " c2 "\nTLE x " c3 "\nRE x " c4 kb.close() kb.close kb String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		int c1 = 0;
		int c2 = 0;
		int c3 = 0;
		int c4 = 0;
		for (int i = 0; i < n; i++) {
			String s = kb.next();
			if (s.equals("AC")) {
				c1 += 1;
			} else if (s.equals("WA")) {
				c2 += 1;
			} else if (s.equals("TLE")) {
				c3 += 1;
			} else {
				c4 += 1;
			}
		}
		System.out.println("AC x " + c1 + "\nWA x " + c2 + "\nTLE x " + c3 + "\nRE x " + c4);
		kb.close();
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		int c1 = 0;
		int c2 = 0;
		int c3 = 0;
		int c4 = 0;
		for (int i = 0; i < n; i++) {
			String s = kb.next();
			if (s.equals("AC")) {
				c1 += 1;
			} else if (s.equals("WA")) {
				c2 += 1;
			} else if (s.equals("TLE")) {
				c3 += 1;
			} else {
				c4 += 1;
			}
		}
		System.out.println("AC x " + c1 + "\nWA x " + c2 + "\nTLE x " + c3 + "\nRE x " + c4);
		kb.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		int c1 = 0;
		int c2 = 0;
		int c3 = 0;
		int c4 = 0;
		for (int i = 0; i < n; i++) {
			String s = kb.next();
			if (s.equals("AC")) {
				c1 += 1;
			} else if (s.equals("WA")) {
				c2 += 1;
			} else if (s.equals("TLE")) {
				c3 += 1;
			} else {
				c4 += 1;
			}
		}
		System.out.println("AC x " + c1 + "\nWA x " + c2 + "\nTLE x " + c3 + "\nRE x " + c4);
		kb.close();
	}

}
