import java.util.Scanner;
public class Main {

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

		int n = in.nextInt();
		String a[] = new String[n];

		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;

		for(int i=0;i<n;i++) {
			a[i] = in.next();
		}

		for(int i=0;i<n;i++) {
			if(a[i].contentEquals("AC")) {
				ac = ac + 1;
			}else if(a[i].contentEquals("WA")) {
				wa++;
			}else if(a[i].contentEquals("TLE")) {
				tle++;
			}else {
				re++;
			}
		}

		System.out.println("AC x "+ac);
		System.out.println("WA x "+wa);
		System.out.println("TLE x "+tle);
		System.out.println("RE x "+re);

	}

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

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

		int n = in.nextInt();
		String a[] = new String[n];

		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;

		for(int i=0;i<n;i++) {
			a[i] = in.next();
		}

		for(int i=0;i<n;i++) {
			if(a[i].contentEquals("AC")) {
				ac = ac + 1;
			}else if(a[i].contentEquals("WA")) {
				wa++;
			}else if(a[i].contentEquals("TLE")) {
				tle++;
			}else {
				re++;
			}
		}

		System.out.println("AC x "+ac);
		System.out.println("WA x "+wa);
		System.out.println("TLE x "+tle);
		System.out.println("RE x "+re);

	}

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

		int n = in.nextInt();
		String a[] = new String[n];

		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;

		for(int i=0;i<n;i++) {
			a[i] = in.next();
		}

		for(int i=0;i<n;i++) {
			if(a[i].contentEquals("AC")) {
				ac = ac + 1;
			}else if(a[i].contentEquals("WA")) {
				wa++;
			}else if(a[i].contentEquals("TLE")) {
				tle++;
			}else {
				re++;
			}
		}

		System.out.println("AC x "+ac);
		System.out.println("WA x "+wa);
		System.out.println("TLE x "+tle);
		System.out.println("RE x "+re);

	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner in = new Scanner(System.in);

		int n = in.nextInt();
		String a[] = new String[n];

		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;

		for(int i=0;i<n;i++) {
			a[i] = in.next();
		}

		for(int i=0;i<n;i++) {
			if(a[i].contentEquals("AC")) {
				ac = ac + 1;
			}else if(a[i].contentEquals("WA")) {
				wa++;
			}else if(a[i].contentEquals("TLE")) {
				tle++;
			}else {
				re++;
			}
		}

		System.out.println("AC x "+ac);
		System.out.println("WA x "+wa);
		System.out.println("TLE x "+tle);
		System.out.println("RE x "+re);

	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in String a[] = new String[n]; a new String[n] n int ac = 0; ac 0 int wa = 0; wa 0 int tle = 0; tle 0 int re = 0; re 0 for(int i=0;i<n;i++) {
			a[i] = in.next();
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			a[i] = in.next();
		} {
			a[i] = in.next();
		} a[i] = in.next() a[i] a i in.next() in.next in for(int i=0;i<n;i++) {
			if(a[i].contentEquals("AC")) {
				ac = ac + 1;
			}else if(a[i].contentEquals("WA")) {
				wa++;
			}else if(a[i].contentEquals("TLE")) {
				tle++;
			}else {
				re++;
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			if(a[i].contentEquals("AC")) {
				ac = ac + 1;
			}else if(a[i].contentEquals("WA")) {
				wa++;
			}else if(a[i].contentEquals("TLE")) {
				tle++;
			}else {
				re++;
			}
		} {
			if(a[i].contentEquals("AC")) {
				ac = ac + 1;
			}else if(a[i].contentEquals("WA")) {
				wa++;
			}else if(a[i].contentEquals("TLE")) {
				tle++;
			}else {
				re++;
			}
		} if(a[i].contentEquals("AC")) {
				ac = ac + 1;
			}else if(a[i].contentEquals("WA")) {
				wa++;
			}else if(a[i].contentEquals("TLE")) {
				tle++;
			}else {
				re++;
			} a[i].contentEquals("AC") a[i].contentEquals a[i] a i "AC" {
				ac = ac + 1;
			} ac = ac + 1 ac ac + 1 ac 1 if(a[i].contentEquals("WA")) {
				wa++;
			}else if(a[i].contentEquals("TLE")) {
				tle++;
			}else {
				re++;
			} a[i].contentEquals("WA") a[i].contentEquals a[i] a i "WA" {
				wa++;
			} wa++ wa if(a[i].contentEquals("TLE")) {
				tle++;
			}else {
				re++;
			} a[i].contentEquals("TLE") a[i].contentEquals a[i] a i "TLE" {
				tle++;
			} tle++ tle {
				re++;
			} re++ re System.out.println("AC x "+ac) System.out.println System.out System System.out "AC x "+ac "AC x " ac System.out.println("WA x "+wa) System.out.println System.out System System.out "WA x "+wa "WA x " wa System.out.println("TLE x "+tle) System.out.println System.out System System.out "TLE x "+tle "TLE x " tle System.out.println("RE x "+re) System.out.println System.out System System.out "RE x "+re "RE x " re String[] args args public class Main {

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

		int n = in.nextInt();
		String a[] = new String[n];

		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;

		for(int i=0;i<n;i++) {
			a[i] = in.next();
		}

		for(int i=0;i<n;i++) {
			if(a[i].contentEquals("AC")) {
				ac = ac + 1;
			}else if(a[i].contentEquals("WA")) {
				wa++;
			}else if(a[i].contentEquals("TLE")) {
				tle++;
			}else {
				re++;
			}
		}

		System.out.println("AC x "+ac);
		System.out.println("WA x "+wa);
		System.out.println("TLE x "+tle);
		System.out.println("RE x "+re);

	}

} public class Main {

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

		int n = in.nextInt();
		String a[] = new String[n];

		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;

		for(int i=0;i<n;i++) {
			a[i] = in.next();
		}

		for(int i=0;i<n;i++) {
			if(a[i].contentEquals("AC")) {
				ac = ac + 1;
			}else if(a[i].contentEquals("WA")) {
				wa++;
			}else if(a[i].contentEquals("TLE")) {
				tle++;
			}else {
				re++;
			}
		}

		System.out.println("AC x "+ac);
		System.out.println("WA x "+wa);
		System.out.println("TLE x "+tle);
		System.out.println("RE x "+re);

	}

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

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

		int n = in.nextInt();
		String a[] = new String[n];

		int ac = 0;
		int wa = 0;
		int tle = 0;
		int re = 0;

		for(int i=0;i<n;i++) {
			a[i] = in.next();
		}

		for(int i=0;i<n;i++) {
			if(a[i].contentEquals("AC")) {
				ac = ac + 1;
			}else if(a[i].contentEquals("WA")) {
				wa++;
			}else if(a[i].contentEquals("TLE")) {
				tle++;
			}else {
				re++;
			}
		}

		System.out.println("AC x "+ac);
		System.out.println("WA x "+wa);
		System.out.println("TLE x "+tle);
		System.out.println("RE x "+re);

	}

}
