import java.util.*;
import java.io.*;
class Main{
	public static void main(String[]args){
		Scanner in=new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out, true);
		int t = Integer.parseInt(in.nextLine());
		int count_1 = 0;
		int count_2 = 0;
		int count_3 = 0;
		int count_4 = 0;
		for(int i=0;i<t;i++){
			String str = in.nextLine();
			if(str.equals("AC"))
				count_1++;
			else if(str.equals("WA"))
				count_2++;
			else if(str.equals("TLE"))
				count_3++;
			else
				count_4++;
		}
		out.println("AC x " + count_1);
		out.println("WA x " + count_2);
		out.println("TLE x " + count_3);
		out.println("RE x " + count_4);
	}
}	 import java.util.*; util.* java import java.io.*; io.* java class Main{
	public static void main(String[]args){
		Scanner in=new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out, true);
		int t = Integer.parseInt(in.nextLine());
		int count_1 = 0;
		int count_2 = 0;
		int count_3 = 0;
		int count_4 = 0;
		for(int i=0;i<t;i++){
			String str = in.nextLine();
			if(str.equals("AC"))
				count_1++;
			else if(str.equals("WA"))
				count_2++;
			else if(str.equals("TLE"))
				count_3++;
			else
				count_4++;
		}
		out.println("AC x " + count_1);
		out.println("WA x " + count_2);
		out.println("TLE x " + count_3);
		out.println("RE x " + count_4);
	}
} Main public static void main(String[]args){
		Scanner in=new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out, true);
		int t = Integer.parseInt(in.nextLine());
		int count_1 = 0;
		int count_2 = 0;
		int count_3 = 0;
		int count_4 = 0;
		for(int i=0;i<t;i++){
			String str = in.nextLine();
			if(str.equals("AC"))
				count_1++;
			else if(str.equals("WA"))
				count_2++;
			else if(str.equals("TLE"))
				count_3++;
			else
				count_4++;
		}
		out.println("AC x " + count_1);
		out.println("WA x " + count_2);
		out.println("TLE x " + count_3);
		out.println("RE x " + count_4);
	} main {
		Scanner in=new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out, true);
		int t = Integer.parseInt(in.nextLine());
		int count_1 = 0;
		int count_2 = 0;
		int count_3 = 0;
		int count_4 = 0;
		for(int i=0;i<t;i++){
			String str = in.nextLine();
			if(str.equals("AC"))
				count_1++;
			else if(str.equals("WA"))
				count_2++;
			else if(str.equals("TLE"))
				count_3++;
			else
				count_4++;
		}
		out.println("AC x " + count_1);
		out.println("WA x " + count_2);
		out.println("TLE x " + count_3);
		out.println("RE x " + count_4);
	} Scanner in=new Scanner(System.in); in new Scanner(System.in) PrintWriter out = new PrintWriter(System.out, true); out new PrintWriter(System.out, true) int t = Integer.parseInt(in.nextLine()); t Integer.parseInt(in.nextLine()) Integer.parseInt Integer in.nextLine() in.nextLine in int count_1 = 0; count_1 0 int count_2 = 0; count_2 0 int count_3 = 0; count_3 0 int count_4 = 0; count_4 0 for(int i=0;i<t;i++){
			String str = in.nextLine();
			if(str.equals("AC"))
				count_1++;
			else if(str.equals("WA"))
				count_2++;
			else if(str.equals("TLE"))
				count_3++;
			else
				count_4++;
		} int i=0; int i=0; i 0 i<t i t i++ i++ i {
			String str = in.nextLine();
			if(str.equals("AC"))
				count_1++;
			else if(str.equals("WA"))
				count_2++;
			else if(str.equals("TLE"))
				count_3++;
			else
				count_4++;
		} {
			String str = in.nextLine();
			if(str.equals("AC"))
				count_1++;
			else if(str.equals("WA"))
				count_2++;
			else if(str.equals("TLE"))
				count_3++;
			else
				count_4++;
		} String str = in.nextLine(); str in.nextLine() in.nextLine in if(str.equals("AC"))
				count_1++;
			else if(str.equals("WA"))
				count_2++;
			else if(str.equals("TLE"))
				count_3++;
			else
				count_4++; str.equals("AC") str.equals str "AC" count_1++ count_1 if(str.equals("WA"))
				count_2++;
			else if(str.equals("TLE"))
				count_3++;
			else
				count_4++; str.equals("WA") str.equals str "WA" count_2++ count_2 if(str.equals("TLE"))
				count_3++;
			else
				count_4++; str.equals("TLE") str.equals str "TLE" count_3++ count_3 count_4++ count_4 out.println("AC x " + count_1) out.println out "AC x " + count_1 "AC x " count_1 out.println("WA x " + count_2) out.println out "WA x " + count_2 "WA x " count_2 out.println("TLE x " + count_3) out.println out "TLE x " + count_3 "TLE x " count_3 out.println("RE x " + count_4) out.println out "RE x " + count_4 "RE x " count_4 String[]args args
import java.util.*;
import java.io.*;
class Main{
	public static void main(String[]args){
		Scanner in=new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out, true);
		int t = Integer.parseInt(in.nextLine());
		int count_1 = 0;
		int count_2 = 0;
		int count_3 = 0;
		int count_4 = 0;
		for(int i=0;i<t;i++){
			String str = in.nextLine();
			if(str.equals("AC"))
				count_1++;
			else if(str.equals("WA"))
				count_2++;
			else if(str.equals("TLE"))
				count_3++;
			else
				count_4++;
		}
		out.println("AC x " + count_1);
		out.println("WA x " + count_2);
		out.println("TLE x " + count_3);
		out.println("RE x " + count_4);
	}
}	
