import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<String> listAC = new ArrayList<String>();
		List<String> listWA = new ArrayList<String>();
		List<String> listTLE = new ArrayList<String>();
		List<String> listRE = new ArrayList<String>();
		for (int i = 0; i < n; i++) {
			sc.nextLine();
			String s = sc.next();
			switch (s) {
			case "AC" : listAC.add(s); break;
			case "WA" : listWA.add(s); break;
			case "TLE" : listTLE.add(s); break;
			case "RE" : listRE.add(s); break;
			}
		}
		System.out.println("AC x " + listAC.size());
		System.out.println("WA x " + listWA.size());
		System.out.println("TLE x " + listTLE.size());
		System.out.println("RE x " + listRE.size());
//		AC x 3
//		WA x 1
//		TLE x 2
//		RE x 0

	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util 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();
		List<String> listAC = new ArrayList<String>();
		List<String> listWA = new ArrayList<String>();
		List<String> listTLE = new ArrayList<String>();
		List<String> listRE = new ArrayList<String>();
		for (int i = 0; i < n; i++) {
			sc.nextLine();
			String s = sc.next();
			switch (s) {
			case "AC" : listAC.add(s); break;
			case "WA" : listWA.add(s); break;
			case "TLE" : listTLE.add(s); break;
			case "RE" : listRE.add(s); break;
			}
		}
		System.out.println("AC x " + listAC.size());
		System.out.println("WA x " + listWA.size());
		System.out.println("TLE x " + listTLE.size());
		System.out.println("RE x " + listRE.size());
//		AC x 3
//		WA x 1
//		TLE x 2
//		RE x 0

	}
} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<String> listAC = new ArrayList<String>();
		List<String> listWA = new ArrayList<String>();
		List<String> listTLE = new ArrayList<String>();
		List<String> listRE = new ArrayList<String>();
		for (int i = 0; i < n; i++) {
			sc.nextLine();
			String s = sc.next();
			switch (s) {
			case "AC" : listAC.add(s); break;
			case "WA" : listWA.add(s); break;
			case "TLE" : listTLE.add(s); break;
			case "RE" : listRE.add(s); break;
			}
		}
		System.out.println("AC x " + listAC.size());
		System.out.println("WA x " + listWA.size());
		System.out.println("TLE x " + listTLE.size());
		System.out.println("RE x " + listRE.size());
//		AC x 3
//		WA x 1
//		TLE x 2
//		RE x 0

	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<String> listAC = new ArrayList<String>();
		List<String> listWA = new ArrayList<String>();
		List<String> listTLE = new ArrayList<String>();
		List<String> listRE = new ArrayList<String>();
		for (int i = 0; i < n; i++) {
			sc.nextLine();
			String s = sc.next();
			switch (s) {
			case "AC" : listAC.add(s); break;
			case "WA" : listWA.add(s); break;
			case "TLE" : listTLE.add(s); break;
			case "RE" : listRE.add(s); break;
			}
		}
		System.out.println("AC x " + listAC.size());
		System.out.println("WA x " + listWA.size());
		System.out.println("TLE x " + listTLE.size());
		System.out.println("RE x " + listRE.size());
//		AC x 3
//		WA x 1
//		TLE x 2
//		RE x 0

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc List<String> listAC = new ArrayList<String>(); listAC new ArrayList<String>() List<String> listWA = new ArrayList<String>(); listWA new ArrayList<String>() List<String> listTLE = new ArrayList<String>(); listTLE new ArrayList<String>() List<String> listRE = new ArrayList<String>(); listRE new ArrayList<String>() for (int i = 0; i < n; i++) {
			sc.nextLine();
			String s = sc.next();
			switch (s) {
			case "AC" : listAC.add(s); break;
			case "WA" : listWA.add(s); break;
			case "TLE" : listTLE.add(s); break;
			case "RE" : listRE.add(s); break;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			sc.nextLine();
			String s = sc.next();
			switch (s) {
			case "AC" : listAC.add(s); break;
			case "WA" : listWA.add(s); break;
			case "TLE" : listTLE.add(s); break;
			case "RE" : listRE.add(s); break;
			}
		} {
			sc.nextLine();
			String s = sc.next();
			switch (s) {
			case "AC" : listAC.add(s); break;
			case "WA" : listWA.add(s); break;
			case "TLE" : listTLE.add(s); break;
			case "RE" : listRE.add(s); break;
			}
		} sc.nextLine() sc.nextLine sc String s = sc.next(); s sc.next() sc.next sc switch (s) {
			case "AC" : listAC.add(s); break;
			case "WA" : listWA.add(s); break;
			case "TLE" : listTLE.add(s); break;
			case "RE" : listRE.add(s); break;
			} s case "AC" : "AC" case "AC" : listAC.add(s) listAC.add listAC s break; case "WA" : "WA" case "WA" : listWA.add(s) listWA.add listWA s break; case "TLE" : "TLE" case "TLE" : listTLE.add(s) listTLE.add listTLE s break; case "RE" : "RE" case "RE" : listRE.add(s) listRE.add listRE s break; System.out.println("AC x " + listAC.size()) System.out.println System.out System System.out "AC x " + listAC.size() "AC x " listAC.size() listAC.size listAC System.out.println("WA x " + listWA.size()) System.out.println System.out System System.out "WA x " + listWA.size() "WA x " listWA.size() listWA.size listWA System.out.println("TLE x " + listTLE.size()) System.out.println System.out System System.out "TLE x " + listTLE.size() "TLE x " listTLE.size() listTLE.size listTLE System.out.println("RE x " + listRE.size()) System.out.println System.out System System.out "RE x " + listRE.size() "RE x " listRE.size() listRE.size listRE String[] args args public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<String> listAC = new ArrayList<String>();
		List<String> listWA = new ArrayList<String>();
		List<String> listTLE = new ArrayList<String>();
		List<String> listRE = new ArrayList<String>();
		for (int i = 0; i < n; i++) {
			sc.nextLine();
			String s = sc.next();
			switch (s) {
			case "AC" : listAC.add(s); break;
			case "WA" : listWA.add(s); break;
			case "TLE" : listTLE.add(s); break;
			case "RE" : listRE.add(s); break;
			}
		}
		System.out.println("AC x " + listAC.size());
		System.out.println("WA x " + listWA.size());
		System.out.println("TLE x " + listTLE.size());
		System.out.println("RE x " + listRE.size());
//		AC x 3
//		WA x 1
//		TLE x 2
//		RE x 0

	}
} public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<String> listAC = new ArrayList<String>();
		List<String> listWA = new ArrayList<String>();
		List<String> listTLE = new ArrayList<String>();
		List<String> listRE = new ArrayList<String>();
		for (int i = 0; i < n; i++) {
			sc.nextLine();
			String s = sc.next();
			switch (s) {
			case "AC" : listAC.add(s); break;
			case "WA" : listWA.add(s); break;
			case "TLE" : listTLE.add(s); break;
			case "RE" : listRE.add(s); break;
			}
		}
		System.out.println("AC x " + listAC.size());
		System.out.println("WA x " + listWA.size());
		System.out.println("TLE x " + listTLE.size());
		System.out.println("RE x " + listRE.size());
//		AC x 3
//		WA x 1
//		TLE x 2
//		RE x 0

	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<String> listAC = new ArrayList<String>();
		List<String> listWA = new ArrayList<String>();
		List<String> listTLE = new ArrayList<String>();
		List<String> listRE = new ArrayList<String>();
		for (int i = 0; i < n; i++) {
			sc.nextLine();
			String s = sc.next();
			switch (s) {
			case "AC" : listAC.add(s); break;
			case "WA" : listWA.add(s); break;
			case "TLE" : listTLE.add(s); break;
			case "RE" : listRE.add(s); break;
			}
		}
		System.out.println("AC x " + listAC.size());
		System.out.println("WA x " + listWA.size());
		System.out.println("TLE x " + listTLE.size());
		System.out.println("RE x " + listRE.size());
//		AC x 3
//		WA x 1
//		TLE x 2
//		RE x 0

	}
}
