import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int acCnt = 0;
		int waCnt = 0;
		int tleCnt = 0;
		int reCnt = 0;
		for (int i = 0; i < n; i++) {
			sc.nextLine();
			switch (sc.next()) {
				case "AC" :
					acCnt++;
					break;
				case "WA" :
					waCnt++;
					break;
				case "TLE" :
					tleCnt++;
					break;
				case "RE" :
					reCnt++;
					break;
			}
		}
		System.out.println("AC x " + acCnt);
		System.out.println("WA x " + waCnt);
		System.out.println("TLE x " + tleCnt);
		System.out.println("RE x " + reCnt);
		
	}
} 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();
		int acCnt = 0;
		int waCnt = 0;
		int tleCnt = 0;
		int reCnt = 0;
		for (int i = 0; i < n; i++) {
			sc.nextLine();
			switch (sc.next()) {
				case "AC" :
					acCnt++;
					break;
				case "WA" :
					waCnt++;
					break;
				case "TLE" :
					tleCnt++;
					break;
				case "RE" :
					reCnt++;
					break;
			}
		}
		System.out.println("AC x " + acCnt);
		System.out.println("WA x " + waCnt);
		System.out.println("TLE x " + tleCnt);
		System.out.println("RE x " + reCnt);
		
	}
} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int acCnt = 0;
		int waCnt = 0;
		int tleCnt = 0;
		int reCnt = 0;
		for (int i = 0; i < n; i++) {
			sc.nextLine();
			switch (sc.next()) {
				case "AC" :
					acCnt++;
					break;
				case "WA" :
					waCnt++;
					break;
				case "TLE" :
					tleCnt++;
					break;
				case "RE" :
					reCnt++;
					break;
			}
		}
		System.out.println("AC x " + acCnt);
		System.out.println("WA x " + waCnt);
		System.out.println("TLE x " + tleCnt);
		System.out.println("RE x " + reCnt);
		
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int acCnt = 0;
		int waCnt = 0;
		int tleCnt = 0;
		int reCnt = 0;
		for (int i = 0; i < n; i++) {
			sc.nextLine();
			switch (sc.next()) {
				case "AC" :
					acCnt++;
					break;
				case "WA" :
					waCnt++;
					break;
				case "TLE" :
					tleCnt++;
					break;
				case "RE" :
					reCnt++;
					break;
			}
		}
		System.out.println("AC x " + acCnt);
		System.out.println("WA x " + waCnt);
		System.out.println("TLE x " + tleCnt);
		System.out.println("RE x " + reCnt);
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int acCnt = 0; acCnt 0 int waCnt = 0; waCnt 0 int tleCnt = 0; tleCnt 0 int reCnt = 0; reCnt 0 for (int i = 0; i < n; i++) {
			sc.nextLine();
			switch (sc.next()) {
				case "AC" :
					acCnt++;
					break;
				case "WA" :
					waCnt++;
					break;
				case "TLE" :
					tleCnt++;
					break;
				case "RE" :
					reCnt++;
					break;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			sc.nextLine();
			switch (sc.next()) {
				case "AC" :
					acCnt++;
					break;
				case "WA" :
					waCnt++;
					break;
				case "TLE" :
					tleCnt++;
					break;
				case "RE" :
					reCnt++;
					break;
			}
		} {
			sc.nextLine();
			switch (sc.next()) {
				case "AC" :
					acCnt++;
					break;
				case "WA" :
					waCnt++;
					break;
				case "TLE" :
					tleCnt++;
					break;
				case "RE" :
					reCnt++;
					break;
			}
		} sc.nextLine() sc.nextLine sc switch (sc.next()) {
				case "AC" :
					acCnt++;
					break;
				case "WA" :
					waCnt++;
					break;
				case "TLE" :
					tleCnt++;
					break;
				case "RE" :
					reCnt++;
					break;
			} sc.next() sc.next sc case "AC" : "AC" case "AC" : acCnt++ acCnt break; case "WA" : "WA" case "WA" : waCnt++ waCnt break; case "TLE" : "TLE" case "TLE" : tleCnt++ tleCnt break; case "RE" : "RE" case "RE" : reCnt++ reCnt break; System.out.println("AC x " + acCnt) System.out.println System.out System System.out "AC x " + acCnt "AC x " acCnt System.out.println("WA x " + waCnt) System.out.println System.out System System.out "WA x " + waCnt "WA x " waCnt System.out.println("TLE x " + tleCnt) System.out.println System.out System System.out "TLE x " + tleCnt "TLE x " tleCnt System.out.println("RE x " + reCnt) System.out.println System.out System System.out "RE x " + reCnt "RE x " reCnt String[] args args public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int acCnt = 0;
		int waCnt = 0;
		int tleCnt = 0;
		int reCnt = 0;
		for (int i = 0; i < n; i++) {
			sc.nextLine();
			switch (sc.next()) {
				case "AC" :
					acCnt++;
					break;
				case "WA" :
					waCnt++;
					break;
				case "TLE" :
					tleCnt++;
					break;
				case "RE" :
					reCnt++;
					break;
			}
		}
		System.out.println("AC x " + acCnt);
		System.out.println("WA x " + waCnt);
		System.out.println("TLE x " + tleCnt);
		System.out.println("RE x " + reCnt);
		
	}
} public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int acCnt = 0;
		int waCnt = 0;
		int tleCnt = 0;
		int reCnt = 0;
		for (int i = 0; i < n; i++) {
			sc.nextLine();
			switch (sc.next()) {
				case "AC" :
					acCnt++;
					break;
				case "WA" :
					waCnt++;
					break;
				case "TLE" :
					tleCnt++;
					break;
				case "RE" :
					reCnt++;
					break;
			}
		}
		System.out.println("AC x " + acCnt);
		System.out.println("WA x " + waCnt);
		System.out.println("TLE x " + tleCnt);
		System.out.println("RE x " + reCnt);
		
	}
} 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();
		int acCnt = 0;
		int waCnt = 0;
		int tleCnt = 0;
		int reCnt = 0;
		for (int i = 0; i < n; i++) {
			sc.nextLine();
			switch (sc.next()) {
				case "AC" :
					acCnt++;
					break;
				case "WA" :
					waCnt++;
					break;
				case "TLE" :
					tleCnt++;
					break;
				case "RE" :
					reCnt++;
					break;
			}
		}
		System.out.println("AC x " + acCnt);
		System.out.println("WA x " + waCnt);
		System.out.println("TLE x " + tleCnt);
		System.out.println("RE x " + reCnt);
		
	}
}
