import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int p = sc.nextInt();
		String[]a=new String[p+1];
		String[] r = {"AC", "WA", "TLE", "RE"};
		int[] x= {0,0,0,0};
		for(int i=0;i<p+1;++i) {
			a[i]= sc.nextLine();


		}
		for(int i=1;i<p+1;i++) {
			for(int j=0;j<4;j++) {
				if(a[i].equals(r[j])) {
					x[j]++;
				}
			}
		}
			for(int i =0;i<4;i++) {
				System.out.println(r[i]+" x "+x[i]);
			}


		}

	}


 import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int p = sc.nextInt();
		String[]a=new String[p+1];
		String[] r = {"AC", "WA", "TLE", "RE"};
		int[] x= {0,0,0,0};
		for(int i=0;i<p+1;++i) {
			a[i]= sc.nextLine();


		}
		for(int i=1;i<p+1;i++) {
			for(int j=0;j<4;j++) {
				if(a[i].equals(r[j])) {
					x[j]++;
				}
			}
		}
			for(int i =0;i<4;i++) {
				System.out.println(r[i]+" x "+x[i]);
			}


		}

	} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int p = sc.nextInt();
		String[]a=new String[p+1];
		String[] r = {"AC", "WA", "TLE", "RE"};
		int[] x= {0,0,0,0};
		for(int i=0;i<p+1;++i) {
			a[i]= sc.nextLine();


		}
		for(int i=1;i<p+1;i++) {
			for(int j=0;j<4;j++) {
				if(a[i].equals(r[j])) {
					x[j]++;
				}
			}
		}
			for(int i =0;i<4;i++) {
				System.out.println(r[i]+" x "+x[i]);
			}


		} main {
		Scanner sc = new Scanner(System.in);
		int p = sc.nextInt();
		String[]a=new String[p+1];
		String[] r = {"AC", "WA", "TLE", "RE"};
		int[] x= {0,0,0,0};
		for(int i=0;i<p+1;++i) {
			a[i]= sc.nextLine();


		}
		for(int i=1;i<p+1;i++) {
			for(int j=0;j<4;j++) {
				if(a[i].equals(r[j])) {
					x[j]++;
				}
			}
		}
			for(int i =0;i<4;i++) {
				System.out.println(r[i]+" x "+x[i]);
			}


		} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int p = sc.nextInt(); p sc.nextInt() sc.nextInt sc String[]a=new String[p+1]; a new String[p+1] p+1 p 1 String[] r = {"AC", "WA", "TLE", "RE"}; r {"AC", "WA", "TLE", "RE"} "AC" "WA" "TLE" "RE" int[] x= {0,0,0,0}; x {0,0,0,0} 0 0 0 0 for(int i=0;i<p+1;++i) {
			a[i]= sc.nextLine();


		} int i=0; int i=0; i 0 i<p+1 i p+1 p 1 ++i ++i i {
			a[i]= sc.nextLine();


		} {
			a[i]= sc.nextLine();


		} a[i]= sc.nextLine() a[i] a i sc.nextLine() sc.nextLine sc for(int i=1;i<p+1;i++) {
			for(int j=0;j<4;j++) {
				if(a[i].equals(r[j])) {
					x[j]++;
				}
			}
		} int i=1; int i=1; i 1 i<p+1 i p+1 p 1 i++ i++ i {
			for(int j=0;j<4;j++) {
				if(a[i].equals(r[j])) {
					x[j]++;
				}
			}
		} {
			for(int j=0;j<4;j++) {
				if(a[i].equals(r[j])) {
					x[j]++;
				}
			}
		} for(int j=0;j<4;j++) {
				if(a[i].equals(r[j])) {
					x[j]++;
				}
			} int j=0; int j=0; j 0 j<4 j 4 j++ j++ j {
				if(a[i].equals(r[j])) {
					x[j]++;
				}
			} {
				if(a[i].equals(r[j])) {
					x[j]++;
				}
			} if(a[i].equals(r[j])) {
					x[j]++;
				} a[i].equals(r[j]) a[i].equals a[i] a i r[j] r j {
					x[j]++;
				} x[j]++ x[j] x j for(int i =0;i<4;i++) {
				System.out.println(r[i]+" x "+x[i]);
			} int i =0; int i =0; i 0 i<4 i 4 i++ i++ i {
				System.out.println(r[i]+" x "+x[i]);
			} {
				System.out.println(r[i]+" x "+x[i]);
			} System.out.println(r[i]+" x "+x[i]) System.out.println System.out System System.out r[i]+" x "+x[i] r[i]+" x "+x[i] r[i] r i " x " x[i] x i String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int p = sc.nextInt();
		String[]a=new String[p+1];
		String[] r = {"AC", "WA", "TLE", "RE"};
		int[] x= {0,0,0,0};
		for(int i=0;i<p+1;++i) {
			a[i]= sc.nextLine();


		}
		for(int i=1;i<p+1;i++) {
			for(int j=0;j<4;j++) {
				if(a[i].equals(r[j])) {
					x[j]++;
				}
			}
		}
			for(int i =0;i<4;i++) {
				System.out.println(r[i]+" x "+x[i]);
			}


		}

	} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int p = sc.nextInt();
		String[]a=new String[p+1];
		String[] r = {"AC", "WA", "TLE", "RE"};
		int[] x= {0,0,0,0};
		for(int i=0;i<p+1;++i) {
			a[i]= sc.nextLine();


		}
		for(int i=1;i<p+1;i++) {
			for(int j=0;j<4;j++) {
				if(a[i].equals(r[j])) {
					x[j]++;
				}
			}
		}
			for(int i =0;i<4;i++) {
				System.out.println(r[i]+" x "+x[i]);
			}


		}

	} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int p = sc.nextInt();
		String[]a=new String[p+1];
		String[] r = {"AC", "WA", "TLE", "RE"};
		int[] x= {0,0,0,0};
		for(int i=0;i<p+1;++i) {
			a[i]= sc.nextLine();


		}
		for(int i=1;i<p+1;i++) {
			for(int j=0;j<4;j++) {
				if(a[i].equals(r[j])) {
					x[j]++;
				}
			}
		}
			for(int i =0;i<4;i++) {
				System.out.println(r[i]+" x "+x[i]);
			}


		}

	}



