import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		String[] ans = new String[N];
		int c0 = 0, c1 = 0, c2 = 0, c3 = 0;

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

		for(int i=0;i<N;i++) {
			if(ans[i].equals("AC")) {
				c0++;
			}else if(ans[i].equals("WA")) {
				c1++;
			}else if(ans[i].equals("TLE")) {
				c2++;
			}else if(ans[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);

		stdIn.close();
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		String[] ans = new String[N];
		int c0 = 0, c1 = 0, c2 = 0, c3 = 0;

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

		for(int i=0;i<N;i++) {
			if(ans[i].equals("AC")) {
				c0++;
			}else if(ans[i].equals("WA")) {
				c1++;
			}else if(ans[i].equals("TLE")) {
				c2++;
			}else if(ans[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);

		stdIn.close();
	}

} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		String[] ans = new String[N];
		int c0 = 0, c1 = 0, c2 = 0, c3 = 0;

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

		for(int i=0;i<N;i++) {
			if(ans[i].equals("AC")) {
				c0++;
			}else if(ans[i].equals("WA")) {
				c1++;
			}else if(ans[i].equals("TLE")) {
				c2++;
			}else if(ans[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);

		stdIn.close();
	} main {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		String[] ans = new String[N];
		int c0 = 0, c1 = 0, c2 = 0, c3 = 0;

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

		for(int i=0;i<N;i++) {
			if(ans[i].equals("AC")) {
				c0++;
			}else if(ans[i].equals("WA")) {
				c1++;
			}else if(ans[i].equals("TLE")) {
				c2++;
			}else if(ans[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);

		stdIn.close();
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int N = stdIn.nextInt(); N stdIn.nextInt() stdIn.nextInt stdIn String[] ans = new String[N]; ans new String[N] N int c0 = 0 c0 0 c1 = 0 c1 0 c2 = 0 c2 0 c3 = 0; c3 0 for(int i=0;i<N;i++) {
			ans[i] = stdIn.next();
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			ans[i] = stdIn.next();
		} {
			ans[i] = stdIn.next();
		} ans[i] = stdIn.next() ans[i] ans i stdIn.next() stdIn.next stdIn for(int i=0;i<N;i++) {
			if(ans[i].equals("AC")) {
				c0++;
			}else if(ans[i].equals("WA")) {
				c1++;
			}else if(ans[i].equals("TLE")) {
				c2++;
			}else if(ans[i].equals("RE")) {
				c3++;
			}
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			if(ans[i].equals("AC")) {
				c0++;
			}else if(ans[i].equals("WA")) {
				c1++;
			}else if(ans[i].equals("TLE")) {
				c2++;
			}else if(ans[i].equals("RE")) {
				c3++;
			}
		} {
			if(ans[i].equals("AC")) {
				c0++;
			}else if(ans[i].equals("WA")) {
				c1++;
			}else if(ans[i].equals("TLE")) {
				c2++;
			}else if(ans[i].equals("RE")) {
				c3++;
			}
		} if(ans[i].equals("AC")) {
				c0++;
			}else if(ans[i].equals("WA")) {
				c1++;
			}else if(ans[i].equals("TLE")) {
				c2++;
			}else if(ans[i].equals("RE")) {
				c3++;
			} ans[i].equals("AC") ans[i].equals ans[i] ans i "AC" {
				c0++;
			} c0++ c0 if(ans[i].equals("WA")) {
				c1++;
			}else if(ans[i].equals("TLE")) {
				c2++;
			}else if(ans[i].equals("RE")) {
				c3++;
			} ans[i].equals("WA") ans[i].equals ans[i] ans i "WA" {
				c1++;
			} c1++ c1 if(ans[i].equals("TLE")) {
				c2++;
			}else if(ans[i].equals("RE")) {
				c3++;
			} ans[i].equals("TLE") ans[i].equals ans[i] ans i "TLE" {
				c2++;
			} c2++ c2 if(ans[i].equals("RE")) {
				c3++;
			} ans[i].equals("RE") ans[i].equals ans[i] ans 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 stdIn.close() stdIn.close stdIn String[] args args public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		String[] ans = new String[N];
		int c0 = 0, c1 = 0, c2 = 0, c3 = 0;

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

		for(int i=0;i<N;i++) {
			if(ans[i].equals("AC")) {
				c0++;
			}else if(ans[i].equals("WA")) {
				c1++;
			}else if(ans[i].equals("TLE")) {
				c2++;
			}else if(ans[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);

		stdIn.close();
	}

} public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		String[] ans = new String[N];
		int c0 = 0, c1 = 0, c2 = 0, c3 = 0;

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

		for(int i=0;i<N;i++) {
			if(ans[i].equals("AC")) {
				c0++;
			}else if(ans[i].equals("WA")) {
				c1++;
			}else if(ans[i].equals("TLE")) {
				c2++;
			}else if(ans[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);

		stdIn.close();
	}

} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		String[] ans = new String[N];
		int c0 = 0, c1 = 0, c2 = 0, c3 = 0;

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

		for(int i=0;i<N;i++) {
			if(ans[i].equals("AC")) {
				c0++;
			}else if(ans[i].equals("WA")) {
				c1++;
			}else if(ans[i].equals("TLE")) {
				c2++;
			}else if(ans[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);

		stdIn.close();
	}

}
