import java.util.*;

public class Main {
	public static void main(String[] args) {
		
		int i, a = 0, w = 0, t = 0, r = 0;
		Scanner myScanner = new Scanner(System.in);
		List <String> array = new ArrayList<>();
		
		i = myScanner.nextInt();
		while(i >= 0) {
			array.add(myScanner.nextLine());
			i --;
		}
		
		Collections.sort(array);
		
		for(int j = 0; j < array.size(); j ++) {
			if(array.get(j).equals("AC"))
				a ++;
			else if(array.get(j).equals("RE"))
				r ++;
			else if(array.get(j).equals("TLE"))
				t ++;
			else if(array.get(j).equals("WA"))
				w ++;
		}
		System.out.println("AC x " + a);
		System.out.println("WA x " + w);
		System.out.println("TLE x " + t);
		System.out.println("RE x " + r);
		
		myScanner.close();
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		
		int i, a = 0, w = 0, t = 0, r = 0;
		Scanner myScanner = new Scanner(System.in);
		List <String> array = new ArrayList<>();
		
		i = myScanner.nextInt();
		while(i >= 0) {
			array.add(myScanner.nextLine());
			i --;
		}
		
		Collections.sort(array);
		
		for(int j = 0; j < array.size(); j ++) {
			if(array.get(j).equals("AC"))
				a ++;
			else if(array.get(j).equals("RE"))
				r ++;
			else if(array.get(j).equals("TLE"))
				t ++;
			else if(array.get(j).equals("WA"))
				w ++;
		}
		System.out.println("AC x " + a);
		System.out.println("WA x " + w);
		System.out.println("TLE x " + t);
		System.out.println("RE x " + r);
		
		myScanner.close();
	}
} Main public static void main(String[] args) {
		
		int i, a = 0, w = 0, t = 0, r = 0;
		Scanner myScanner = new Scanner(System.in);
		List <String> array = new ArrayList<>();
		
		i = myScanner.nextInt();
		while(i >= 0) {
			array.add(myScanner.nextLine());
			i --;
		}
		
		Collections.sort(array);
		
		for(int j = 0; j < array.size(); j ++) {
			if(array.get(j).equals("AC"))
				a ++;
			else if(array.get(j).equals("RE"))
				r ++;
			else if(array.get(j).equals("TLE"))
				t ++;
			else if(array.get(j).equals("WA"))
				w ++;
		}
		System.out.println("AC x " + a);
		System.out.println("WA x " + w);
		System.out.println("TLE x " + t);
		System.out.println("RE x " + r);
		
		myScanner.close();
	} main {
		
		int i, a = 0, w = 0, t = 0, r = 0;
		Scanner myScanner = new Scanner(System.in);
		List <String> array = new ArrayList<>();
		
		i = myScanner.nextInt();
		while(i >= 0) {
			array.add(myScanner.nextLine());
			i --;
		}
		
		Collections.sort(array);
		
		for(int j = 0; j < array.size(); j ++) {
			if(array.get(j).equals("AC"))
				a ++;
			else if(array.get(j).equals("RE"))
				r ++;
			else if(array.get(j).equals("TLE"))
				t ++;
			else if(array.get(j).equals("WA"))
				w ++;
		}
		System.out.println("AC x " + a);
		System.out.println("WA x " + w);
		System.out.println("TLE x " + t);
		System.out.println("RE x " + r);
		
		myScanner.close();
	} int i i a = 0 a 0 w = 0 w 0 t = 0 t 0 r = 0; r 0 Scanner myScanner = new Scanner(System.in); myScanner new Scanner(System.in) List <String> array = new ArrayList<>(); array new ArrayList<>() i = myScanner.nextInt() i myScanner.nextInt() myScanner.nextInt myScanner while(i >= 0) {
			array.add(myScanner.nextLine());
			i --;
		} i >= 0 i 0 {
			array.add(myScanner.nextLine());
			i --;
		} array.add(myScanner.nextLine()) array.add array myScanner.nextLine() myScanner.nextLine myScanner i -- i Collections.sort(array) Collections.sort Collections array for(int j = 0; j < array.size(); j ++) {
			if(array.get(j).equals("AC"))
				a ++;
			else if(array.get(j).equals("RE"))
				r ++;
			else if(array.get(j).equals("TLE"))
				t ++;
			else if(array.get(j).equals("WA"))
				w ++;
		} int j = 0; int j = 0; j 0 j < array.size() j array.size() array.size array j ++ j ++ j {
			if(array.get(j).equals("AC"))
				a ++;
			else if(array.get(j).equals("RE"))
				r ++;
			else if(array.get(j).equals("TLE"))
				t ++;
			else if(array.get(j).equals("WA"))
				w ++;
		} {
			if(array.get(j).equals("AC"))
				a ++;
			else if(array.get(j).equals("RE"))
				r ++;
			else if(array.get(j).equals("TLE"))
				t ++;
			else if(array.get(j).equals("WA"))
				w ++;
		} if(array.get(j).equals("AC"))
				a ++;
			else if(array.get(j).equals("RE"))
				r ++;
			else if(array.get(j).equals("TLE"))
				t ++;
			else if(array.get(j).equals("WA"))
				w ++; array.get(j).equals("AC") array.get(j).equals array.get(j) array.get array j "AC" a ++ a if(array.get(j).equals("RE"))
				r ++;
			else if(array.get(j).equals("TLE"))
				t ++;
			else if(array.get(j).equals("WA"))
				w ++; array.get(j).equals("RE") array.get(j).equals array.get(j) array.get array j "RE" r ++ r if(array.get(j).equals("TLE"))
				t ++;
			else if(array.get(j).equals("WA"))
				w ++; array.get(j).equals("TLE") array.get(j).equals array.get(j) array.get array j "TLE" t ++ t if(array.get(j).equals("WA"))
				w ++; array.get(j).equals("WA") array.get(j).equals array.get(j) array.get array j "WA" w ++ w System.out.println("AC x " + a) System.out.println System.out System System.out "AC x " + a "AC x " a System.out.println("WA x " + w) System.out.println System.out System System.out "WA x " + w "WA x " w System.out.println("TLE x " + t) System.out.println System.out System System.out "TLE x " + t "TLE x " t System.out.println("RE x " + r) System.out.println System.out System System.out "RE x " + r "RE x " r myScanner.close() myScanner.close myScanner String[] args args public class Main {
	public static void main(String[] args) {
		
		int i, a = 0, w = 0, t = 0, r = 0;
		Scanner myScanner = new Scanner(System.in);
		List <String> array = new ArrayList<>();
		
		i = myScanner.nextInt();
		while(i >= 0) {
			array.add(myScanner.nextLine());
			i --;
		}
		
		Collections.sort(array);
		
		for(int j = 0; j < array.size(); j ++) {
			if(array.get(j).equals("AC"))
				a ++;
			else if(array.get(j).equals("RE"))
				r ++;
			else if(array.get(j).equals("TLE"))
				t ++;
			else if(array.get(j).equals("WA"))
				w ++;
		}
		System.out.println("AC x " + a);
		System.out.println("WA x " + w);
		System.out.println("TLE x " + t);
		System.out.println("RE x " + r);
		
		myScanner.close();
	}
} public class Main {
	public static void main(String[] args) {
		
		int i, a = 0, w = 0, t = 0, r = 0;
		Scanner myScanner = new Scanner(System.in);
		List <String> array = new ArrayList<>();
		
		i = myScanner.nextInt();
		while(i >= 0) {
			array.add(myScanner.nextLine());
			i --;
		}
		
		Collections.sort(array);
		
		for(int j = 0; j < array.size(); j ++) {
			if(array.get(j).equals("AC"))
				a ++;
			else if(array.get(j).equals("RE"))
				r ++;
			else if(array.get(j).equals("TLE"))
				t ++;
			else if(array.get(j).equals("WA"))
				w ++;
		}
		System.out.println("AC x " + a);
		System.out.println("WA x " + w);
		System.out.println("TLE x " + t);
		System.out.println("RE x " + r);
		
		myScanner.close();
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		
		int i, a = 0, w = 0, t = 0, r = 0;
		Scanner myScanner = new Scanner(System.in);
		List <String> array = new ArrayList<>();
		
		i = myScanner.nextInt();
		while(i >= 0) {
			array.add(myScanner.nextLine());
			i --;
		}
		
		Collections.sort(array);
		
		for(int j = 0; j < array.size(); j ++) {
			if(array.get(j).equals("AC"))
				a ++;
			else if(array.get(j).equals("RE"))
				r ++;
			else if(array.get(j).equals("TLE"))
				t ++;
			else if(array.get(j).equals("WA"))
				w ++;
		}
		System.out.println("AC x " + a);
		System.out.println("WA x " + w);
		System.out.println("TLE x " + t);
		System.out.println("RE x " + r);
		
		myScanner.close();
	}
}
