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 = new String[N];
		String AC ="AC";
		String WA ="WA";
		String TLE ="TLE";
		String RE ="RE";
		int C0=0;
		int C1=0;
		int C2=0;
		int C3=0;
		if((1<=N)&&(N<=Math.pow(10, 5))) {
		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);
		
		sc.close();
	}

} 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 = new String[N];
		String AC ="AC";
		String WA ="WA";
		String TLE ="TLE";
		String RE ="RE";
		int C0=0;
		int C1=0;
		int C2=0;
		int C3=0;
		if((1<=N)&&(N<=Math.pow(10, 5))) {
		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);
		
		sc.close();
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String [] S = new String[N];
		String AC ="AC";
		String WA ="WA";
		String TLE ="TLE";
		String RE ="RE";
		int C0=0;
		int C1=0;
		int C2=0;
		int C3=0;
		if((1<=N)&&(N<=Math.pow(10, 5))) {
		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);
		
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String [] S = new String[N];
		String AC ="AC";
		String WA ="WA";
		String TLE ="TLE";
		String RE ="RE";
		int C0=0;
		int C1=0;
		int C2=0;
		int C3=0;
		if((1<=N)&&(N<=Math.pow(10, 5))) {
		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);
		
		sc.close();
	} 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 String AC ="AC"; AC "AC" String WA ="WA"; WA "WA" String TLE ="TLE"; TLE "TLE" String RE ="RE"; RE "RE" int C0=0; C0 0 int C1=0; C1 0 int C2=0; C2 0 int C3=0; C3 0 if((1<=N)&&(N<=Math.pow(10, 5))) {
		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++;
			}
		}
		} (1<=N)&&(N<=Math.pow(10, 5)) (1<=N) 1 N (N<=Math.pow(10, 5)) N Math.pow(10, 5) Math.pow Math 10 5 {
		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++;
			}
		}
		} 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++ 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++ 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++ C2 if(S[i].equals(RE)) {
				C3++;
			} S[i].equals(RE) S[i].equals S[i] S i RE {
				C3++;
			} C3++ C3 System.out.println("AC x "+C0) System.out.println System.out System System.out "AC x "+C0 "AC x " C0 System.out.println("WA x "+C1) System.out.println System.out System System.out "WA x "+C1 "WA x " C1 System.out.println("TLE x "+C2) System.out.println System.out System System.out "TLE x "+C2 "TLE x " C2 System.out.println("RE x "+C3) System.out.println System.out System System.out "RE x "+C3 "RE x " C3 sc.close() sc.close sc 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];
		String AC ="AC";
		String WA ="WA";
		String TLE ="TLE";
		String RE ="RE";
		int C0=0;
		int C1=0;
		int C2=0;
		int C3=0;
		if((1<=N)&&(N<=Math.pow(10, 5))) {
		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);
		
		sc.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String [] S = new String[N];
		String AC ="AC";
		String WA ="WA";
		String TLE ="TLE";
		String RE ="RE";
		int C0=0;
		int C1=0;
		int C2=0;
		int C3=0;
		if((1<=N)&&(N<=Math.pow(10, 5))) {
		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);
		
		sc.close();
	}

} 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 = new String[N];
		String AC ="AC";
		String WA ="WA";
		String TLE ="TLE";
		String RE ="RE";
		int C0=0;
		int C1=0;
		int C2=0;
		int C3=0;
		if((1<=N)&&(N<=Math.pow(10, 5))) {
		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);
		
		sc.close();
	}

}