import java.util.*;
public class Main {
	public static void main(String[] args){
      	int a=0,w=0,t=0,r=0;
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	for(int i=0;i<N;i++){
          String s = sc.next();
          if(s.equals("AC")){
            a++;
          }
          if(s.equals("WA")){
            w++;
          }
          if(s.equals("TLE")){
            t++;
          }
          if(s.equals("RE")){
            r++;
          }
        }
      	System.out.println("AC x "+a);
      	System.out.println("WA x "+w);
      	System.out.println("TLE x "+t);
      	System.out.println("RE x "+r);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
      	int a=0,w=0,t=0,r=0;
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	for(int i=0;i<N;i++){
          String s = sc.next();
          if(s.equals("AC")){
            a++;
          }
          if(s.equals("WA")){
            w++;
          }
          if(s.equals("TLE")){
            t++;
          }
          if(s.equals("RE")){
            r++;
          }
        }
      	System.out.println("AC x "+a);
      	System.out.println("WA x "+w);
      	System.out.println("TLE x "+t);
      	System.out.println("RE x "+r);
	}
} Main public static void main(String[] args){
      	int a=0,w=0,t=0,r=0;
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	for(int i=0;i<N;i++){
          String s = sc.next();
          if(s.equals("AC")){
            a++;
          }
          if(s.equals("WA")){
            w++;
          }
          if(s.equals("TLE")){
            t++;
          }
          if(s.equals("RE")){
            r++;
          }
        }
      	System.out.println("AC x "+a);
      	System.out.println("WA x "+w);
      	System.out.println("TLE x "+t);
      	System.out.println("RE x "+r);
	} main {
      	int a=0,w=0,t=0,r=0;
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	for(int i=0;i<N;i++){
          String s = sc.next();
          if(s.equals("AC")){
            a++;
          }
          if(s.equals("WA")){
            w++;
          }
          if(s.equals("TLE")){
            t++;
          }
          if(s.equals("RE")){
            r++;
          }
        }
      	System.out.println("AC x "+a);
      	System.out.println("WA x "+w);
      	System.out.println("TLE x "+t);
      	System.out.println("RE x "+r);
	} int a=0 a 0 w=0 w 0 t=0 t 0 r=0; r 0 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc for(int i=0;i<N;i++){
          String s = sc.next();
          if(s.equals("AC")){
            a++;
          }
          if(s.equals("WA")){
            w++;
          }
          if(s.equals("TLE")){
            t++;
          }
          if(s.equals("RE")){
            r++;
          }
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
          String s = sc.next();
          if(s.equals("AC")){
            a++;
          }
          if(s.equals("WA")){
            w++;
          }
          if(s.equals("TLE")){
            t++;
          }
          if(s.equals("RE")){
            r++;
          }
        } {
          String s = sc.next();
          if(s.equals("AC")){
            a++;
          }
          if(s.equals("WA")){
            w++;
          }
          if(s.equals("TLE")){
            t++;
          }
          if(s.equals("RE")){
            r++;
          }
        } String s = sc.next(); s sc.next() sc.next sc if(s.equals("AC")){
            a++;
          } s.equals("AC") s.equals s "AC" {
            a++;
          } a++ a if(s.equals("WA")){
            w++;
          } s.equals("WA") s.equals s "WA" {
            w++;
          } w++ w if(s.equals("TLE")){
            t++;
          } s.equals("TLE") s.equals s "TLE" {
            t++;
          } t++ t if(s.equals("RE")){
            r++;
          } s.equals("RE") s.equals s "RE" {
            r++;
          } r++ r 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 String[] args args public class Main {
	public static void main(String[] args){
      	int a=0,w=0,t=0,r=0;
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	for(int i=0;i<N;i++){
          String s = sc.next();
          if(s.equals("AC")){
            a++;
          }
          if(s.equals("WA")){
            w++;
          }
          if(s.equals("TLE")){
            t++;
          }
          if(s.equals("RE")){
            r++;
          }
        }
      	System.out.println("AC x "+a);
      	System.out.println("WA x "+w);
      	System.out.println("TLE x "+t);
      	System.out.println("RE x "+r);
	}
} public class Main {
	public static void main(String[] args){
      	int a=0,w=0,t=0,r=0;
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	for(int i=0;i<N;i++){
          String s = sc.next();
          if(s.equals("AC")){
            a++;
          }
          if(s.equals("WA")){
            w++;
          }
          if(s.equals("TLE")){
            t++;
          }
          if(s.equals("RE")){
            r++;
          }
        }
      	System.out.println("AC x "+a);
      	System.out.println("WA x "+w);
      	System.out.println("TLE x "+t);
      	System.out.println("RE x "+r);
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
      	int a=0,w=0,t=0,r=0;
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	for(int i=0;i<N;i++){
          String s = sc.next();
          if(s.equals("AC")){
            a++;
          }
          if(s.equals("WA")){
            w++;
          }
          if(s.equals("TLE")){
            t++;
          }
          if(s.equals("RE")){
            r++;
          }
        }
      	System.out.println("AC x "+a);
      	System.out.println("WA x "+w);
      	System.out.println("TLE x "+t);
      	System.out.println("RE x "+r);
	}
}