import java.util.*;

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

public class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt(); 
    
    int c0 = 0;
    int c1 = 0;
    int c2 = 0;
    int c3 = 0;
    
    for(int i=0; i<N; i++){
      String S=sc.next();
      
      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);
      
  }
}
        
