import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int countAC = 0;
		int countWA = 0;
		int countTLE = 0;
		int countRE = 0;
		while(n-->=0) {
			String curr = sc.nextLine();
			if(curr.equals("AC")) countAC++;
			if(curr.equals("WA")) countWA++;
			if(curr.equals("TLE")) countTLE++;
			if(curr.equals("RE")) countRE++;

		}
		System.out.println("AC x "+ countAC);
		System.out.println("WA x "+ countWA);
		System.out.println("TLE x "+ countTLE);
		System.out.println("RE x "+ countRE);

	}

} 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();
		int countAC = 0;
		int countWA = 0;
		int countTLE = 0;
		int countRE = 0;
		while(n-->=0) {
			String curr = sc.nextLine();
			if(curr.equals("AC")) countAC++;
			if(curr.equals("WA")) countWA++;
			if(curr.equals("TLE")) countTLE++;
			if(curr.equals("RE")) countRE++;

		}
		System.out.println("AC x "+ countAC);
		System.out.println("WA x "+ countWA);
		System.out.println("TLE x "+ countTLE);
		System.out.println("RE x "+ countRE);

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int countAC = 0;
		int countWA = 0;
		int countTLE = 0;
		int countRE = 0;
		while(n-->=0) {
			String curr = sc.nextLine();
			if(curr.equals("AC")) countAC++;
			if(curr.equals("WA")) countWA++;
			if(curr.equals("TLE")) countTLE++;
			if(curr.equals("RE")) countRE++;

		}
		System.out.println("AC x "+ countAC);
		System.out.println("WA x "+ countWA);
		System.out.println("TLE x "+ countTLE);
		System.out.println("RE x "+ countRE);

	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int countAC = 0;
		int countWA = 0;
		int countTLE = 0;
		int countRE = 0;
		while(n-->=0) {
			String curr = sc.nextLine();
			if(curr.equals("AC")) countAC++;
			if(curr.equals("WA")) countWA++;
			if(curr.equals("TLE")) countTLE++;
			if(curr.equals("RE")) countRE++;

		}
		System.out.println("AC x "+ countAC);
		System.out.println("WA x "+ countWA);
		System.out.println("TLE x "+ countTLE);
		System.out.println("RE x "+ countRE);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int countAC = 0; countAC 0 int countWA = 0; countWA 0 int countTLE = 0; countTLE 0 int countRE = 0; countRE 0 while(n-->=0) {
			String curr = sc.nextLine();
			if(curr.equals("AC")) countAC++;
			if(curr.equals("WA")) countWA++;
			if(curr.equals("TLE")) countTLE++;
			if(curr.equals("RE")) countRE++;

		} n-->=0 n-- n 0 {
			String curr = sc.nextLine();
			if(curr.equals("AC")) countAC++;
			if(curr.equals("WA")) countWA++;
			if(curr.equals("TLE")) countTLE++;
			if(curr.equals("RE")) countRE++;

		} String curr = sc.nextLine(); curr sc.nextLine() sc.nextLine sc if(curr.equals("AC")) countAC++; curr.equals("AC") curr.equals curr "AC" countAC++ countAC if(curr.equals("WA")) countWA++; curr.equals("WA") curr.equals curr "WA" countWA++ countWA if(curr.equals("TLE")) countTLE++; curr.equals("TLE") curr.equals curr "TLE" countTLE++ countTLE if(curr.equals("RE")) countRE++; curr.equals("RE") curr.equals curr "RE" countRE++ countRE System.out.println("AC x "+ countAC) System.out.println System.out System System.out "AC x "+ countAC "AC x " countAC System.out.println("WA x "+ countWA) System.out.println System.out System System.out "WA x "+ countWA "WA x " countWA System.out.println("TLE x "+ countTLE) System.out.println System.out System System.out "TLE x "+ countTLE "TLE x " countTLE System.out.println("RE x "+ countRE) System.out.println System.out System System.out "RE x "+ countRE "RE x " countRE String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int countAC = 0;
		int countWA = 0;
		int countTLE = 0;
		int countRE = 0;
		while(n-->=0) {
			String curr = sc.nextLine();
			if(curr.equals("AC")) countAC++;
			if(curr.equals("WA")) countWA++;
			if(curr.equals("TLE")) countTLE++;
			if(curr.equals("RE")) countRE++;

		}
		System.out.println("AC x "+ countAC);
		System.out.println("WA x "+ countWA);
		System.out.println("TLE x "+ countTLE);
		System.out.println("RE x "+ countRE);

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int countAC = 0;
		int countWA = 0;
		int countTLE = 0;
		int countRE = 0;
		while(n-->=0) {
			String curr = sc.nextLine();
			if(curr.equals("AC")) countAC++;
			if(curr.equals("WA")) countWA++;
			if(curr.equals("TLE")) countTLE++;
			if(curr.equals("RE")) countRE++;

		}
		System.out.println("AC x "+ countAC);
		System.out.println("WA x "+ countWA);
		System.out.println("TLE x "+ countTLE);
		System.out.println("RE x "+ countRE);

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int countAC = 0;
		int countWA = 0;
		int countTLE = 0;
		int countRE = 0;
		while(n-->=0) {
			String curr = sc.nextLine();
			if(curr.equals("AC")) countAC++;
			if(curr.equals("WA")) countWA++;
			if(curr.equals("TLE")) countTLE++;
			if(curr.equals("RE")) countRE++;

		}
		System.out.println("AC x "+ countAC);
		System.out.println("WA x "+ countWA);
		System.out.println("TLE x "+ countTLE);
		System.out.println("RE x "+ countRE);

	}

}
