//package project1;
import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.function.*;
import java.util.regex.*;
import java.util.stream.*;
import static java.util.stream.Collectors.joining;
import static java.util.stream.Collectors.toList;

public class Main {
      public static void main(String args[]) {
    	  Scanner sc = new Scanner(System.in);
    	  int n = sc.nextInt();
    	  sc.nextLine();
    	  int a=0,w=0,t=0,r=0;
    	  while(n-->0) {
    		 String s = sc.nextLine();
    		 if(s.contains("AC"))
    			 a++;
    		 else if(s.contains("WA"))
    			 w++;
    		 else if(s.contains("TLE"))
    			 t++;
    		 else 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.io.*; io.* java import java.math.*; math.* java import java.security.*; security.* java import java.text.*; text.* java import java.util.*; util.* java import java.util.concurrent.*; concurrent.* java.util import java.util.function.*; function.* java.util import java.util.regex.*; regex.* java.util import java.util.stream.*; stream.* java.util import static java.util.stream.Collectors.joining; import static java.util.stream.Collectors.joining; import static java.util.stream.Collectors.joining; import static java.util.stream.Collectors.toList; import static java.util.stream.Collectors.toList; import static java.util.stream.Collectors.toList; public class Main {
      public static void main(String args[]) {
    	  Scanner sc = new Scanner(System.in);
    	  int n = sc.nextInt();
    	  sc.nextLine();
    	  int a=0,w=0,t=0,r=0;
    	  while(n-->0) {
    		 String s = sc.nextLine();
    		 if(s.contains("AC"))
    			 a++;
    		 else if(s.contains("WA"))
    			 w++;
    		 else if(s.contains("TLE"))
    			 t++;
    		 else 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[]) {
    	  Scanner sc = new Scanner(System.in);
    	  int n = sc.nextInt();
    	  sc.nextLine();
    	  int a=0,w=0,t=0,r=0;
    	  while(n-->0) {
    		 String s = sc.nextLine();
    		 if(s.contains("AC"))
    			 a++;
    		 else if(s.contains("WA"))
    			 w++;
    		 else if(s.contains("TLE"))
    			 t++;
    		 else 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 {
    	  Scanner sc = new Scanner(System.in);
    	  int n = sc.nextInt();
    	  sc.nextLine();
    	  int a=0,w=0,t=0,r=0;
    	  while(n-->0) {
    		 String s = sc.nextLine();
    		 if(s.contains("AC"))
    			 a++;
    		 else if(s.contains("WA"))
    			 w++;
    		 else if(s.contains("TLE"))
    			 t++;
    		 else 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);
      } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc int a=0 a 0 w=0 w 0 t=0 t 0 r=0; r 0 while(n-->0) {
    		 String s = sc.nextLine();
    		 if(s.contains("AC"))
    			 a++;
    		 else if(s.contains("WA"))
    			 w++;
    		 else if(s.contains("TLE"))
    			 t++;
    		 else r++;
    	  } n-->0 n-- n 0 {
    		 String s = sc.nextLine();
    		 if(s.contains("AC"))
    			 a++;
    		 else if(s.contains("WA"))
    			 w++;
    		 else if(s.contains("TLE"))
    			 t++;
    		 else r++;
    	  } String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc if(s.contains("AC"))
    			 a++;
    		 else if(s.contains("WA"))
    			 w++;
    		 else if(s.contains("TLE"))
    			 t++;
    		 else r++; s.contains("AC") s.contains s "AC" a++ a if(s.contains("WA"))
    			 w++;
    		 else if(s.contains("TLE"))
    			 t++;
    		 else r++; s.contains("WA") s.contains s "WA" w++ w if(s.contains("TLE"))
    			 t++;
    		 else r++; s.contains("TLE") s.contains s "TLE" t++ t 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[]) {
    	  Scanner sc = new Scanner(System.in);
    	  int n = sc.nextInt();
    	  sc.nextLine();
    	  int a=0,w=0,t=0,r=0;
    	  while(n-->0) {
    		 String s = sc.nextLine();
    		 if(s.contains("AC"))
    			 a++;
    		 else if(s.contains("WA"))
    			 w++;
    		 else if(s.contains("TLE"))
    			 t++;
    		 else 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[]) {
    	  Scanner sc = new Scanner(System.in);
    	  int n = sc.nextInt();
    	  sc.nextLine();
    	  int a=0,w=0,t=0,r=0;
    	  while(n-->0) {
    		 String s = sc.nextLine();
    		 if(s.contains("AC"))
    			 a++;
    		 else if(s.contains("WA"))
    			 w++;
    		 else if(s.contains("TLE"))
    			 t++;
    		 else 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
//package project1;
import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.function.*;
import java.util.regex.*;
import java.util.stream.*;
import static java.util.stream.Collectors.joining;
import static java.util.stream.Collectors.toList;

public class Main {
      public static void main(String args[]) {
    	  Scanner sc = new Scanner(System.in);
    	  int n = sc.nextInt();
    	  sc.nextLine();
    	  int a=0,w=0,t=0,r=0;
    	  while(n-->0) {
    		 String s = sc.nextLine();
    		 if(s.contains("AC"))
    			 a++;
    		 else if(s.contains("WA"))
    			 w++;
    		 else if(s.contains("TLE"))
    			 t++;
    		 else 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);
      }
}
