import java.util.Scanner;

public class Main {

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

		int n = sc.nextInt();
		String s;
		int ac_count = 0;
		int wa_count = 0;
		int tle_count = 0;
		int re_count = 0;

		for(int i=0; i<n; i++) {
			s = sc.next();
			if(s.equals("AC")) {
				ac_count++;
			}else if(s.equals("WA")) {
				wa_count++;
			}else if(s.equals("TLE")) {
				tle_count++;
			}else if(s.equals("RE")) {
				re_count++;
			}
		}

		System.out.println("AC x " + ac_count);
		System.out.println("WA x " + wa_count);
		System.out.println("TLE x " + tle_count);
		System.out.println("RE x " + re_count);
	}

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

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

		int n = sc.nextInt();
		String s;
		int ac_count = 0;
		int wa_count = 0;
		int tle_count = 0;
		int re_count = 0;

		for(int i=0; i<n; i++) {
			s = sc.next();
			if(s.equals("AC")) {
				ac_count++;
			}else if(s.equals("WA")) {
				wa_count++;
			}else if(s.equals("TLE")) {
				tle_count++;
			}else if(s.equals("RE")) {
				re_count++;
			}
		}

		System.out.println("AC x " + ac_count);
		System.out.println("WA x " + wa_count);
		System.out.println("TLE x " + tle_count);
		System.out.println("RE x " + re_count);
	}

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

		int n = sc.nextInt();
		String s;
		int ac_count = 0;
		int wa_count = 0;
		int tle_count = 0;
		int re_count = 0;

		for(int i=0; i<n; i++) {
			s = sc.next();
			if(s.equals("AC")) {
				ac_count++;
			}else if(s.equals("WA")) {
				wa_count++;
			}else if(s.equals("TLE")) {
				tle_count++;
			}else if(s.equals("RE")) {
				re_count++;
			}
		}

		System.out.println("AC x " + ac_count);
		System.out.println("WA x " + wa_count);
		System.out.println("TLE x " + tle_count);
		System.out.println("RE x " + re_count);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		String s;
		int ac_count = 0;
		int wa_count = 0;
		int tle_count = 0;
		int re_count = 0;

		for(int i=0; i<n; i++) {
			s = sc.next();
			if(s.equals("AC")) {
				ac_count++;
			}else if(s.equals("WA")) {
				wa_count++;
			}else if(s.equals("TLE")) {
				tle_count++;
			}else if(s.equals("RE")) {
				re_count++;
			}
		}

		System.out.println("AC x " + ac_count);
		System.out.println("WA x " + wa_count);
		System.out.println("TLE x " + tle_count);
		System.out.println("RE x " + re_count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String s; s int ac_count = 0; ac_count 0 int wa_count = 0; wa_count 0 int tle_count = 0; tle_count 0 int re_count = 0; re_count 0 for(int i=0; i<n; i++) {
			s = sc.next();
			if(s.equals("AC")) {
				ac_count++;
			}else if(s.equals("WA")) {
				wa_count++;
			}else if(s.equals("TLE")) {
				tle_count++;
			}else if(s.equals("RE")) {
				re_count++;
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			s = sc.next();
			if(s.equals("AC")) {
				ac_count++;
			}else if(s.equals("WA")) {
				wa_count++;
			}else if(s.equals("TLE")) {
				tle_count++;
			}else if(s.equals("RE")) {
				re_count++;
			}
		} {
			s = sc.next();
			if(s.equals("AC")) {
				ac_count++;
			}else if(s.equals("WA")) {
				wa_count++;
			}else if(s.equals("TLE")) {
				tle_count++;
			}else if(s.equals("RE")) {
				re_count++;
			}
		} s = sc.next() s sc.next() sc.next sc if(s.equals("AC")) {
				ac_count++;
			}else if(s.equals("WA")) {
				wa_count++;
			}else if(s.equals("TLE")) {
				tle_count++;
			}else if(s.equals("RE")) {
				re_count++;
			} s.equals("AC") s.equals s "AC" {
				ac_count++;
			} ac_count++ ac_count if(s.equals("WA")) {
				wa_count++;
			}else if(s.equals("TLE")) {
				tle_count++;
			}else if(s.equals("RE")) {
				re_count++;
			} s.equals("WA") s.equals s "WA" {
				wa_count++;
			} wa_count++ wa_count if(s.equals("TLE")) {
				tle_count++;
			}else if(s.equals("RE")) {
				re_count++;
			} s.equals("TLE") s.equals s "TLE" {
				tle_count++;
			} tle_count++ tle_count if(s.equals("RE")) {
				re_count++;
			} s.equals("RE") s.equals s "RE" {
				re_count++;
			} re_count++ re_count System.out.println("AC x " + ac_count) System.out.println System.out System System.out "AC x " + ac_count "AC x " ac_count System.out.println("WA x " + wa_count) System.out.println System.out System System.out "WA x " + wa_count "WA x " wa_count System.out.println("TLE x " + tle_count) System.out.println System.out System System.out "TLE x " + tle_count "TLE x " tle_count System.out.println("RE x " + re_count) System.out.println System.out System System.out "RE x " + re_count "RE x " re_count String[] args args public class Main {

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

		int n = sc.nextInt();
		String s;
		int ac_count = 0;
		int wa_count = 0;
		int tle_count = 0;
		int re_count = 0;

		for(int i=0; i<n; i++) {
			s = sc.next();
			if(s.equals("AC")) {
				ac_count++;
			}else if(s.equals("WA")) {
				wa_count++;
			}else if(s.equals("TLE")) {
				tle_count++;
			}else if(s.equals("RE")) {
				re_count++;
			}
		}

		System.out.println("AC x " + ac_count);
		System.out.println("WA x " + wa_count);
		System.out.println("TLE x " + tle_count);
		System.out.println("RE x " + re_count);
	}

} public class Main {

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

		int n = sc.nextInt();
		String s;
		int ac_count = 0;
		int wa_count = 0;
		int tle_count = 0;
		int re_count = 0;

		for(int i=0; i<n; i++) {
			s = sc.next();
			if(s.equals("AC")) {
				ac_count++;
			}else if(s.equals("WA")) {
				wa_count++;
			}else if(s.equals("TLE")) {
				tle_count++;
			}else if(s.equals("RE")) {
				re_count++;
			}
		}

		System.out.println("AC x " + ac_count);
		System.out.println("WA x " + wa_count);
		System.out.println("TLE x " + tle_count);
		System.out.println("RE x " + re_count);
	}

} Main
import java.util.Scanner;

public class Main {

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

		int n = sc.nextInt();
		String s;
		int ac_count = 0;
		int wa_count = 0;
		int tle_count = 0;
		int re_count = 0;

		for(int i=0; i<n; i++) {
			s = sc.next();
			if(s.equals("AC")) {
				ac_count++;
			}else if(s.equals("WA")) {
				wa_count++;
			}else if(s.equals("TLE")) {
				tle_count++;
			}else if(s.equals("RE")) {
				re_count++;
			}
		}

		System.out.println("AC x " + ac_count);
		System.out.println("WA x " + wa_count);
		System.out.println("TLE x " + tle_count);
		System.out.println("RE x " + re_count);
	}

}
