import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int count1 = 0;
		int count2 = 0;
		int count3 = 0;
		int count4 = 0;
		
		for(int i = 0; i < N; i++) {
			 String C = scan.next();
			if(C.contentEquals("AC")) {
				count1++;
			}else if(C.contentEquals("WA")) {
				count2++;
			}else if(C.contentEquals("TLE")){
				count3++;
			}else {
				count4++;
		
			}
		}
		System.out.println("AC x "+count1);
		System.out.println("WA x "+count2);
		System.out.println("TLE x "+count3);
		System.out.println("RE x "+count4);
	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int count1 = 0;
		int count2 = 0;
		int count3 = 0;
		int count4 = 0;
		
		for(int i = 0; i < N; i++) {
			 String C = scan.next();
			if(C.contentEquals("AC")) {
				count1++;
			}else if(C.contentEquals("WA")) {
				count2++;
			}else if(C.contentEquals("TLE")){
				count3++;
			}else {
				count4++;
		
			}
		}
		System.out.println("AC x "+count1);
		System.out.println("WA x "+count2);
		System.out.println("TLE x "+count3);
		System.out.println("RE x "+count4);
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int count1 = 0;
		int count2 = 0;
		int count3 = 0;
		int count4 = 0;
		
		for(int i = 0; i < N; i++) {
			 String C = scan.next();
			if(C.contentEquals("AC")) {
				count1++;
			}else if(C.contentEquals("WA")) {
				count2++;
			}else if(C.contentEquals("TLE")){
				count3++;
			}else {
				count4++;
		
			}
		}
		System.out.println("AC x "+count1);
		System.out.println("WA x "+count2);
		System.out.println("TLE x "+count3);
		System.out.println("RE x "+count4);
	} main {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int count1 = 0;
		int count2 = 0;
		int count3 = 0;
		int count4 = 0;
		
		for(int i = 0; i < N; i++) {
			 String C = scan.next();
			if(C.contentEquals("AC")) {
				count1++;
			}else if(C.contentEquals("WA")) {
				count2++;
			}else if(C.contentEquals("TLE")){
				count3++;
			}else {
				count4++;
		
			}
		}
		System.out.println("AC x "+count1);
		System.out.println("WA x "+count2);
		System.out.println("TLE x "+count3);
		System.out.println("RE x "+count4);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int count1 = 0; count1 0 int count2 = 0; count2 0 int count3 = 0; count3 0 int count4 = 0; count4 0 for(int i = 0; i < N; i++) {
			 String C = scan.next();
			if(C.contentEquals("AC")) {
				count1++;
			}else if(C.contentEquals("WA")) {
				count2++;
			}else if(C.contentEquals("TLE")){
				count3++;
			}else {
				count4++;
		
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			 String C = scan.next();
			if(C.contentEquals("AC")) {
				count1++;
			}else if(C.contentEquals("WA")) {
				count2++;
			}else if(C.contentEquals("TLE")){
				count3++;
			}else {
				count4++;
		
			}
		} {
			 String C = scan.next();
			if(C.contentEquals("AC")) {
				count1++;
			}else if(C.contentEquals("WA")) {
				count2++;
			}else if(C.contentEquals("TLE")){
				count3++;
			}else {
				count4++;
		
			}
		} String C = scan.next(); C scan.next() scan.next scan if(C.contentEquals("AC")) {
				count1++;
			}else if(C.contentEquals("WA")) {
				count2++;
			}else if(C.contentEquals("TLE")){
				count3++;
			}else {
				count4++;
		
			} C.contentEquals("AC") C.contentEquals C "AC" {
				count1++;
			} count1++ count1 if(C.contentEquals("WA")) {
				count2++;
			}else if(C.contentEquals("TLE")){
				count3++;
			}else {
				count4++;
		
			} C.contentEquals("WA") C.contentEquals C "WA" {
				count2++;
			} count2++ count2 if(C.contentEquals("TLE")){
				count3++;
			}else {
				count4++;
		
			} C.contentEquals("TLE") C.contentEquals C "TLE" {
				count3++;
			} count3++ count3 {
				count4++;
		
			} count4++ count4 System.out.println("AC x "+count1) System.out.println System.out System System.out "AC x "+count1 "AC x " count1 System.out.println("WA x "+count2) System.out.println System.out System System.out "WA x "+count2 "WA x " count2 System.out.println("TLE x "+count3) System.out.println System.out System System.out "TLE x "+count3 "TLE x " count3 System.out.println("RE x "+count4) System.out.println System.out System System.out "RE x "+count4 "RE x " count4 String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int count1 = 0;
		int count2 = 0;
		int count3 = 0;
		int count4 = 0;
		
		for(int i = 0; i < N; i++) {
			 String C = scan.next();
			if(C.contentEquals("AC")) {
				count1++;
			}else if(C.contentEquals("WA")) {
				count2++;
			}else if(C.contentEquals("TLE")){
				count3++;
			}else {
				count4++;
		
			}
		}
		System.out.println("AC x "+count1);
		System.out.println("WA x "+count2);
		System.out.println("TLE x "+count3);
		System.out.println("RE x "+count4);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int count1 = 0;
		int count2 = 0;
		int count3 = 0;
		int count4 = 0;
		
		for(int i = 0; i < N; i++) {
			 String C = scan.next();
			if(C.contentEquals("AC")) {
				count1++;
			}else if(C.contentEquals("WA")) {
				count2++;
			}else if(C.contentEquals("TLE")){
				count3++;
			}else {
				count4++;
		
			}
		}
		System.out.println("AC x "+count1);
		System.out.println("WA x "+count2);
		System.out.println("TLE x "+count3);
		System.out.println("RE x "+count4);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int count1 = 0;
		int count2 = 0;
		int count3 = 0;
		int count4 = 0;
		
		for(int i = 0; i < N; i++) {
			 String C = scan.next();
			if(C.contentEquals("AC")) {
				count1++;
			}else if(C.contentEquals("WA")) {
				count2++;
			}else if(C.contentEquals("TLE")){
				count3++;
			}else {
				count4++;
		
			}
		}
		System.out.println("AC x "+count1);
		System.out.println("WA x "+count2);
		System.out.println("TLE x "+count3);
		System.out.println("RE x "+count4);
	}

}
