import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		//int n = sc.nextInt();
		//String s = sc.next();
		long n = sc.nextLong();
		//double n = sc.nextDouble();
		int a = 0;
		int b = 0;
		int c = 0;
		int d = 0;

		
		for(int i = 0; i < n ; i++) {
			String s = sc.next();
			if(s.equals("AC")) {
				a++;
			}else if (s.equals("WA")) {
				b++;
			}else if (s.equals("TLE")) {
				c++;
			}else {
				d++;
			}
		}
		
		System.out.println("AC x "+ a);
		System.out.println("WA x "+ b);
		System.out.println("TLE x "+ c);
		System.out.println("RE x "+ d);


		//System.out.println("Yes");
		//System.out.println("No");
		

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

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		//int n = sc.nextInt();
		//String s = sc.next();
		long n = sc.nextLong();
		//double n = sc.nextDouble();
		int a = 0;
		int b = 0;
		int c = 0;
		int d = 0;

		
		for(int i = 0; i < n ; i++) {
			String s = sc.next();
			if(s.equals("AC")) {
				a++;
			}else if (s.equals("WA")) {
				b++;
			}else if (s.equals("TLE")) {
				c++;
			}else {
				d++;
			}
		}
		
		System.out.println("AC x "+ a);
		System.out.println("WA x "+ b);
		System.out.println("TLE x "+ c);
		System.out.println("RE x "+ d);


		//System.out.println("Yes");
		//System.out.println("No");
		

	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		//int n = sc.nextInt();
		//String s = sc.next();
		long n = sc.nextLong();
		//double n = sc.nextDouble();
		int a = 0;
		int b = 0;
		int c = 0;
		int d = 0;

		
		for(int i = 0; i < n ; i++) {
			String s = sc.next();
			if(s.equals("AC")) {
				a++;
			}else if (s.equals("WA")) {
				b++;
			}else if (s.equals("TLE")) {
				c++;
			}else {
				d++;
			}
		}
		
		System.out.println("AC x "+ a);
		System.out.println("WA x "+ b);
		System.out.println("TLE x "+ c);
		System.out.println("RE x "+ d);


		//System.out.println("Yes");
		//System.out.println("No");
		

	} main {

		Scanner sc = new Scanner(System.in);
		
		//int n = sc.nextInt();
		//String s = sc.next();
		long n = sc.nextLong();
		//double n = sc.nextDouble();
		int a = 0;
		int b = 0;
		int c = 0;
		int d = 0;

		
		for(int i = 0; i < n ; i++) {
			String s = sc.next();
			if(s.equals("AC")) {
				a++;
			}else if (s.equals("WA")) {
				b++;
			}else if (s.equals("TLE")) {
				c++;
			}else {
				d++;
			}
		}
		
		System.out.println("AC x "+ a);
		System.out.println("WA x "+ b);
		System.out.println("TLE x "+ c);
		System.out.println("RE x "+ d);


		//System.out.println("Yes");
		//System.out.println("No");
		

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc int a = 0; a 0 int b = 0; b 0 int c = 0; c 0 int d = 0; d 0 for(int i = 0; i < n ; i++) {
			String s = sc.next();
			if(s.equals("AC")) {
				a++;
			}else if (s.equals("WA")) {
				b++;
			}else if (s.equals("TLE")) {
				c++;
			}else {
				d++;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String s = sc.next();
			if(s.equals("AC")) {
				a++;
			}else if (s.equals("WA")) {
				b++;
			}else if (s.equals("TLE")) {
				c++;
			}else {
				d++;
			}
		} {
			String s = sc.next();
			if(s.equals("AC")) {
				a++;
			}else if (s.equals("WA")) {
				b++;
			}else if (s.equals("TLE")) {
				c++;
			}else {
				d++;
			}
		} String s = sc.next(); s sc.next() sc.next sc if(s.equals("AC")) {
				a++;
			}else if (s.equals("WA")) {
				b++;
			}else if (s.equals("TLE")) {
				c++;
			}else {
				d++;
			} s.equals("AC") s.equals s "AC" {
				a++;
			} a++ a if (s.equals("WA")) {
				b++;
			}else if (s.equals("TLE")) {
				c++;
			}else {
				d++;
			} s.equals("WA") s.equals s "WA" {
				b++;
			} b++ b if (s.equals("TLE")) {
				c++;
			}else {
				d++;
			} s.equals("TLE") s.equals s "TLE" {
				c++;
			} c++ c {
				d++;
			} d++ d System.out.println("AC x "+ a) System.out.println System.out System System.out "AC x "+ a "AC x " a System.out.println("WA x "+ b) System.out.println System.out System System.out "WA x "+ b "WA x " b System.out.println("TLE x "+ c) System.out.println System.out System System.out "TLE x "+ c "TLE x " c System.out.println("RE x "+ d) System.out.println System.out System System.out "RE x "+ d "RE x " d String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		//int n = sc.nextInt();
		//String s = sc.next();
		long n = sc.nextLong();
		//double n = sc.nextDouble();
		int a = 0;
		int b = 0;
		int c = 0;
		int d = 0;

		
		for(int i = 0; i < n ; i++) {
			String s = sc.next();
			if(s.equals("AC")) {
				a++;
			}else if (s.equals("WA")) {
				b++;
			}else if (s.equals("TLE")) {
				c++;
			}else {
				d++;
			}
		}
		
		System.out.println("AC x "+ a);
		System.out.println("WA x "+ b);
		System.out.println("TLE x "+ c);
		System.out.println("RE x "+ d);


		//System.out.println("Yes");
		//System.out.println("No");
		

	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		//int n = sc.nextInt();
		//String s = sc.next();
		long n = sc.nextLong();
		//double n = sc.nextDouble();
		int a = 0;
		int b = 0;
		int c = 0;
		int d = 0;

		
		for(int i = 0; i < n ; i++) {
			String s = sc.next();
			if(s.equals("AC")) {
				a++;
			}else if (s.equals("WA")) {
				b++;
			}else if (s.equals("TLE")) {
				c++;
			}else {
				d++;
			}
		}
		
		System.out.println("AC x "+ a);
		System.out.println("WA x "+ b);
		System.out.println("TLE x "+ c);
		System.out.println("RE x "+ d);


		//System.out.println("Yes");
		//System.out.println("No");
		

	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		//int n = sc.nextInt();
		//String s = sc.next();
		long n = sc.nextLong();
		//double n = sc.nextDouble();
		int a = 0;
		int b = 0;
		int c = 0;
		int d = 0;

		
		for(int i = 0; i < n ; i++) {
			String s = sc.next();
			if(s.equals("AC")) {
				a++;
			}else if (s.equals("WA")) {
				b++;
			}else if (s.equals("TLE")) {
				c++;
			}else {
				d++;
			}
		}
		
		System.out.println("AC x "+ a);
		System.out.println("WA x "+ b);
		System.out.println("TLE x "+ c);
		System.out.println("RE x "+ d);


		//System.out.println("Yes");
		//System.out.println("No");
		

	}
}
