import java.util.*;
 
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String[] S = new String[N];
		int C0 = 0;
		int C1 = 0;
		int C2 = 0;
		int C3 = 0;

		for(int i = 0; i < N; i ++){
			S[i] = sc.next();
		}

		for(int i = 0; i < N; i ++){
			if(S[i].equals("AC"))
			C0 ++;
			else if(S[i].equals("WA"))
			C1 ++;
			else if(S[i].equals("TLE"))
			C2 ++;
			else if(S[i].equals("RE"))
			C3 ++;
		}
		System.out.println("AC" +" " +  "x" +" " + C0);
		System.out.println("WA" +" " +  "x" +" " + C1);
		System.out.println("TLE" +" " +  "x" +" " + C2);
		System.out.println("RE" +" " +  "x" +" " + C3);

	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String[] S = new String[N];
		int C0 = 0;
		int C1 = 0;
		int C2 = 0;
		int C3 = 0;

		for(int i = 0; i < N; i ++){
			S[i] = sc.next();
		}

		for(int i = 0; i < N; i ++){
			if(S[i].equals("AC"))
			C0 ++;
			else if(S[i].equals("WA"))
			C1 ++;
			else if(S[i].equals("TLE"))
			C2 ++;
			else if(S[i].equals("RE"))
			C3 ++;
		}
		System.out.println("AC" +" " +  "x" +" " + C0);
		System.out.println("WA" +" " +  "x" +" " + C1);
		System.out.println("TLE" +" " +  "x" +" " + C2);
		System.out.println("RE" +" " +  "x" +" " + C3);

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String[] S = new String[N];
		int C0 = 0;
		int C1 = 0;
		int C2 = 0;
		int C3 = 0;

		for(int i = 0; i < N; i ++){
			S[i] = sc.next();
		}

		for(int i = 0; i < N; i ++){
			if(S[i].equals("AC"))
			C0 ++;
			else if(S[i].equals("WA"))
			C1 ++;
			else if(S[i].equals("TLE"))
			C2 ++;
			else if(S[i].equals("RE"))
			C3 ++;
		}
		System.out.println("AC" +" " +  "x" +" " + C0);
		System.out.println("WA" +" " +  "x" +" " + C1);
		System.out.println("TLE" +" " +  "x" +" " + C2);
		System.out.println("RE" +" " +  "x" +" " + C3);

	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String[] S = new String[N];
		int C0 = 0;
		int C1 = 0;
		int C2 = 0;
		int C3 = 0;

		for(int i = 0; i < N; i ++){
			S[i] = sc.next();
		}

		for(int i = 0; i < N; i ++){
			if(S[i].equals("AC"))
			C0 ++;
			else if(S[i].equals("WA"))
			C1 ++;
			else if(S[i].equals("TLE"))
			C2 ++;
			else if(S[i].equals("RE"))
			C3 ++;
		}
		System.out.println("AC" +" " +  "x" +" " + C0);
		System.out.println("WA" +" " +  "x" +" " + C1);
		System.out.println("TLE" +" " +  "x" +" " + C2);
		System.out.println("RE" +" " +  "x" +" " + C3);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc String[] S = new String[N]; S new String[N] N int C0 = 0; C0 0 int C1 = 0; C1 0 int C2 = 0; C2 0 int C3 = 0; C3 0 for(int i = 0; i < N; i ++){
			S[i] = sc.next();
		} int i = 0; int i = 0; i 0 i < N i N i ++ i ++ i {
			S[i] = sc.next();
		} {
			S[i] = sc.next();
		} S[i] = sc.next() S[i] S i sc.next() sc.next sc for(int i = 0; i < N; i ++){
			if(S[i].equals("AC"))
			C0 ++;
			else if(S[i].equals("WA"))
			C1 ++;
			else if(S[i].equals("TLE"))
			C2 ++;
			else if(S[i].equals("RE"))
			C3 ++;
		} int i = 0; int i = 0; i 0 i < N i N i ++ i ++ i {
			if(S[i].equals("AC"))
			C0 ++;
			else if(S[i].equals("WA"))
			C1 ++;
			else if(S[i].equals("TLE"))
			C2 ++;
			else if(S[i].equals("RE"))
			C3 ++;
		} {
			if(S[i].equals("AC"))
			C0 ++;
			else if(S[i].equals("WA"))
			C1 ++;
			else if(S[i].equals("TLE"))
			C2 ++;
			else if(S[i].equals("RE"))
			C3 ++;
		} if(S[i].equals("AC"))
			C0 ++;
			else if(S[i].equals("WA"))
			C1 ++;
			else if(S[i].equals("TLE"))
			C2 ++;
			else if(S[i].equals("RE"))
			C3 ++; S[i].equals("AC") S[i].equals S[i] S i "AC" C0 ++ C0 if(S[i].equals("WA"))
			C1 ++;
			else if(S[i].equals("TLE"))
			C2 ++;
			else if(S[i].equals("RE"))
			C3 ++; S[i].equals("WA") S[i].equals S[i] S i "WA" C1 ++ C1 if(S[i].equals("TLE"))
			C2 ++;
			else if(S[i].equals("RE"))
			C3 ++; S[i].equals("TLE") S[i].equals S[i] S i "TLE" C2 ++ C2 if(S[i].equals("RE"))
			C3 ++; S[i].equals("RE") S[i].equals S[i] S i "RE" C3 ++ C3 System.out.println("AC" +" " +  "x" +" " + C0) System.out.println System.out System System.out "AC" +" " +  "x" +" " + C0 " " "x" "AC" +" " +  "x" +" " + C0 "AC" " " "x" " " C0 System.out.println("WA" +" " +  "x" +" " + C1) System.out.println System.out System System.out "WA" +" " +  "x" +" " + C1 " " "x" "WA" +" " +  "x" +" " + C1 "WA" " " "x" " " C1 System.out.println("TLE" +" " +  "x" +" " + C2) System.out.println System.out System System.out "TLE" +" " +  "x" +" " + C2 " " "x" "TLE" +" " +  "x" +" " + C2 "TLE" " " "x" " " C2 System.out.println("RE" +" " +  "x" +" " + C3) System.out.println System.out System System.out "RE" +" " +  "x" +" " + C3 " " "x" "RE" +" " +  "x" +" " + C3 "RE" " " "x" " " C3 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String[] S = new String[N];
		int C0 = 0;
		int C1 = 0;
		int C2 = 0;
		int C3 = 0;

		for(int i = 0; i < N; i ++){
			S[i] = sc.next();
		}

		for(int i = 0; i < N; i ++){
			if(S[i].equals("AC"))
			C0 ++;
			else if(S[i].equals("WA"))
			C1 ++;
			else if(S[i].equals("TLE"))
			C2 ++;
			else if(S[i].equals("RE"))
			C3 ++;
		}
		System.out.println("AC" +" " +  "x" +" " + C0);
		System.out.println("WA" +" " +  "x" +" " + C1);
		System.out.println("TLE" +" " +  "x" +" " + C2);
		System.out.println("RE" +" " +  "x" +" " + C3);

	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String[] S = new String[N];
		int C0 = 0;
		int C1 = 0;
		int C2 = 0;
		int C3 = 0;

		for(int i = 0; i < N; i ++){
			S[i] = sc.next();
		}

		for(int i = 0; i < N; i ++){
			if(S[i].equals("AC"))
			C0 ++;
			else if(S[i].equals("WA"))
			C1 ++;
			else if(S[i].equals("TLE"))
			C2 ++;
			else if(S[i].equals("RE"))
			C3 ++;
		}
		System.out.println("AC" +" " +  "x" +" " + C0);
		System.out.println("WA" +" " +  "x" +" " + C1);
		System.out.println("TLE" +" " +  "x" +" " + C2);
		System.out.println("RE" +" " +  "x" +" " + C3);

	}
} Main
import java.util.*;
 
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String[] S = new String[N];
		int C0 = 0;
		int C1 = 0;
		int C2 = 0;
		int C3 = 0;

		for(int i = 0; i < N; i ++){
			S[i] = sc.next();
		}

		for(int i = 0; i < N; i ++){
			if(S[i].equals("AC"))
			C0 ++;
			else if(S[i].equals("WA"))
			C1 ++;
			else if(S[i].equals("TLE"))
			C2 ++;
			else if(S[i].equals("RE"))
			C3 ++;
		}
		System.out.println("AC" +" " +  "x" +" " + C0);
		System.out.println("WA" +" " +  "x" +" " + C1);
		System.out.println("TLE" +" " +  "x" +" " + C2);
		System.out.println("RE" +" " +  "x" +" " + C3);

	}
}