import java.util.*;

class Main {
	public static void main (String[] args) {
    	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      
      	String[] result = new String[n];
      	for (int i = 0; i<n; i++) {result[i] = sc.next();}
      
      	int c0 = 0;
      	int c1 = 0;
      	int c2 = 0;
      	int c3 = 0;
      	String ac = "AC";
      	String wa = "WA";
      	String tle = "TLE";
      	String re = "RE";
      	String s;
      	for (int i=0; i<n; i++) {
        	s = result[i];
          	
          	if (s.equals(ac)) {c0++;}
          	else if (s.equals(wa)) {c1++;}
          	else if (s.equals(tle)) {c2++;}
          	else if (s.equals(re)) {c3++;}
        }
      	
      	System.out.println("AC" + " x " + c0);
      	System.out.println("WA" + " x " + c1);
      	System.out.println("TLE" + " x " + c2);
      	System.out.println("RE" + " x " + c3);
    }
} import java.util.*; util.* java class Main {
	public static void main (String[] args) {
    	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      
      	String[] result = new String[n];
      	for (int i = 0; i<n; i++) {result[i] = sc.next();}
      
      	int c0 = 0;
      	int c1 = 0;
      	int c2 = 0;
      	int c3 = 0;
      	String ac = "AC";
      	String wa = "WA";
      	String tle = "TLE";
      	String re = "RE";
      	String s;
      	for (int i=0; i<n; i++) {
        	s = result[i];
          	
          	if (s.equals(ac)) {c0++;}
          	else if (s.equals(wa)) {c1++;}
          	else if (s.equals(tle)) {c2++;}
          	else if (s.equals(re)) {c3++;}
        }
      	
      	System.out.println("AC" + " x " + c0);
      	System.out.println("WA" + " x " + c1);
      	System.out.println("TLE" + " x " + c2);
      	System.out.println("RE" + " x " + c3);
    }
} Main public static void main (String[] args) {
    	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      
      	String[] result = new String[n];
      	for (int i = 0; i<n; i++) {result[i] = sc.next();}
      
      	int c0 = 0;
      	int c1 = 0;
      	int c2 = 0;
      	int c3 = 0;
      	String ac = "AC";
      	String wa = "WA";
      	String tle = "TLE";
      	String re = "RE";
      	String s;
      	for (int i=0; i<n; i++) {
        	s = result[i];
          	
          	if (s.equals(ac)) {c0++;}
          	else if (s.equals(wa)) {c1++;}
          	else if (s.equals(tle)) {c2++;}
          	else if (s.equals(re)) {c3++;}
        }
      	
      	System.out.println("AC" + " x " + c0);
      	System.out.println("WA" + " x " + c1);
      	System.out.println("TLE" + " x " + c2);
      	System.out.println("RE" + " x " + c3);
    } main {
    	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      
      	String[] result = new String[n];
      	for (int i = 0; i<n; i++) {result[i] = sc.next();}
      
      	int c0 = 0;
      	int c1 = 0;
      	int c2 = 0;
      	int c3 = 0;
      	String ac = "AC";
      	String wa = "WA";
      	String tle = "TLE";
      	String re = "RE";
      	String s;
      	for (int i=0; i<n; i++) {
        	s = result[i];
          	
          	if (s.equals(ac)) {c0++;}
          	else if (s.equals(wa)) {c1++;}
          	else if (s.equals(tle)) {c2++;}
          	else if (s.equals(re)) {c3++;}
        }
      	
      	System.out.println("AC" + " x " + c0);
      	System.out.println("WA" + " x " + c1);
      	System.out.println("TLE" + " x " + c2);
      	System.out.println("RE" + " x " + c3);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String[] result = new String[n]; result new String[n] n for (int i = 0; i<n; i++) {result[i] = sc.next();} int i = 0; int i = 0; i 0 i<n i n i++ i++ i {result[i] = sc.next();} {result[i] = sc.next();} result[i] = sc.next() result[i] result i sc.next() sc.next sc int c0 = 0; c0 0 int c1 = 0; c1 0 int c2 = 0; c2 0 int c3 = 0; c3 0 String ac = "AC"; ac "AC" String wa = "WA"; wa "WA" String tle = "TLE"; tle "TLE" String re = "RE"; re "RE" String s; s for (int i=0; i<n; i++) {
        	s = result[i];
          	
          	if (s.equals(ac)) {c0++;}
          	else if (s.equals(wa)) {c1++;}
          	else if (s.equals(tle)) {c2++;}
          	else if (s.equals(re)) {c3++;}
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
        	s = result[i];
          	
          	if (s.equals(ac)) {c0++;}
          	else if (s.equals(wa)) {c1++;}
          	else if (s.equals(tle)) {c2++;}
          	else if (s.equals(re)) {c3++;}
        } {
        	s = result[i];
          	
          	if (s.equals(ac)) {c0++;}
          	else if (s.equals(wa)) {c1++;}
          	else if (s.equals(tle)) {c2++;}
          	else if (s.equals(re)) {c3++;}
        } s = result[i] s result[i] result i if (s.equals(ac)) {c0++;}
          	else if (s.equals(wa)) {c1++;}
          	else if (s.equals(tle)) {c2++;}
          	else if (s.equals(re)) {c3++;} s.equals(ac) s.equals s ac {c0++;} c0++ c0 if (s.equals(wa)) {c1++;}
          	else if (s.equals(tle)) {c2++;}
          	else if (s.equals(re)) {c3++;} s.equals(wa) s.equals s wa {c1++;} c1++ c1 if (s.equals(tle)) {c2++;}
          	else if (s.equals(re)) {c3++;} s.equals(tle) s.equals s tle {c2++;} c2++ c2 if (s.equals(re)) {c3++;} s.equals(re) s.equals s re {c3++;} c3++ c3 System.out.println("AC" + " x " + c0) System.out.println System.out System System.out "AC" + " x " + c0 "AC" + " x " + c0 "AC" " x " c0 System.out.println("WA" + " x " + c1) System.out.println System.out System System.out "WA" + " x " + c1 "WA" + " x " + c1 "WA" " x " c1 System.out.println("TLE" + " x " + c2) System.out.println System.out System System.out "TLE" + " x " + c2 "TLE" + " x " + c2 "TLE" " x " c2 System.out.println("RE" + " x " + c3) System.out.println System.out System System.out "RE" + " x " + c3 "RE" + " x " + c3 "RE" " x " c3 String[] args args
import java.util.*;

class Main {
	public static void main (String[] args) {
    	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      
      	String[] result = new String[n];
      	for (int i = 0; i<n; i++) {result[i] = sc.next();}
      
      	int c0 = 0;
      	int c1 = 0;
      	int c2 = 0;
      	int c3 = 0;
      	String ac = "AC";
      	String wa = "WA";
      	String tle = "TLE";
      	String re = "RE";
      	String s;
      	for (int i=0; i<n; i++) {
        	s = result[i];
          	
          	if (s.equals(ac)) {c0++;}
          	else if (s.equals(wa)) {c1++;}
          	else if (s.equals(tle)) {c2++;}
          	else if (s.equals(re)) {c3++;}
        }
      	
      	System.out.println("AC" + " x " + c0);
      	System.out.println("WA" + " x " + c1);
      	System.out.println("TLE" + " x " + c2);
      	System.out.println("RE" + " x " + c3);
    }
}