import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
 
public class Main {
    public static void main(String[] args) {
      // AC,TLE,WA,RE
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      int N;
      int i = 0; 
      while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      String List[] = list.get(0).split(" ",0);
      N = Integer.parseInt(List[0]);
  //    System.out.println(N);
      String ce[] = new String[N];
      while(i < N){
        ce[i] = list.get(i + 1);
        i++;
      }
 //     System.out.println(ce[5]);
      check(ce,N);
   
      scan.close();
    }
  
  public static void check(String[] ce,int n){
    // AC,TLE,WA,RE
    int countA = 0, countT = 0, countW = 0, countR = 0;
   // System.out.println(n);
    int i = 0;
    while(i < n){
  //    System.out.println("ok");
      if(ce[i].equals("AC")){
        countA = countA + 1;
      }else if(ce[i].equals("TLE")){
        countT = countT + 1;
      }else if(ce[i].equals("WA")){
        countW = countW + 1;
      }else if(ce[i].equals("RE")){
        countR = countR + 1;
      }
      i++;
    }
    System.out.println("AC x "+countA);
    System.out.println("WA x "+countW);
    System.out.println("TLE x "+countT);
    System.out.println("RE x "+countR);
    return;
      }
}
     import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.List; List java.util public class Main {
    public static void main(String[] args) {
      // AC,TLE,WA,RE
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      int N;
      int i = 0; 
      while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      String List[] = list.get(0).split(" ",0);
      N = Integer.parseInt(List[0]);
  //    System.out.println(N);
      String ce[] = new String[N];
      while(i < N){
        ce[i] = list.get(i + 1);
        i++;
      }
 //     System.out.println(ce[5]);
      check(ce,N);
   
      scan.close();
    }
  
  public static void check(String[] ce,int n){
    // AC,TLE,WA,RE
    int countA = 0, countT = 0, countW = 0, countR = 0;
   // System.out.println(n);
    int i = 0;
    while(i < n){
  //    System.out.println("ok");
      if(ce[i].equals("AC")){
        countA = countA + 1;
      }else if(ce[i].equals("TLE")){
        countT = countT + 1;
      }else if(ce[i].equals("WA")){
        countW = countW + 1;
      }else if(ce[i].equals("RE")){
        countR = countR + 1;
      }
      i++;
    }
    System.out.println("AC x "+countA);
    System.out.println("WA x "+countW);
    System.out.println("TLE x "+countT);
    System.out.println("RE x "+countR);
    return;
      }
} Main public static void main(String[] args) {
      // AC,TLE,WA,RE
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      int N;
      int i = 0; 
      while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      String List[] = list.get(0).split(" ",0);
      N = Integer.parseInt(List[0]);
  //    System.out.println(N);
      String ce[] = new String[N];
      while(i < N){
        ce[i] = list.get(i + 1);
        i++;
      }
 //     System.out.println(ce[5]);
      check(ce,N);
   
      scan.close();
    } main {
      // AC,TLE,WA,RE
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      int N;
      int i = 0; 
      while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      String List[] = list.get(0).split(" ",0);
      N = Integer.parseInt(List[0]);
  //    System.out.println(N);
      String ce[] = new String[N];
      while(i < N){
        ce[i] = list.get(i + 1);
        i++;
      }
 //     System.out.println(ce[5]);
      check(ce,N);
   
      scan.close();
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) ArrayList<String> list = new ArrayList<String>(); list new ArrayList<String>() int N; N int i = 0; i 0 while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      } scan.hasNextLine() scan.hasNextLine scan {
      String an = scan.nextLine();
      list.add(an);
      } String an = scan.nextLine(); an scan.nextLine() scan.nextLine scan list.add(an) list.add list an String List[] = list.get(0).split(" ",0); List list.get(0).split(" ",0) list.get(0).split list.get(0) list.get list 0 " " 0 N = Integer.parseInt(List[0]) N Integer.parseInt(List[0]) Integer.parseInt Integer List[0] List 0 String ce[] = new String[N]; ce new String[N] N while(i < N){
        ce[i] = list.get(i + 1);
        i++;
      } i < N i N {
        ce[i] = list.get(i + 1);
        i++;
      } ce[i] = list.get(i + 1) ce[i] ce i list.get(i + 1) list.get list i + 1 i 1 i++ i check(ce,N) check ce N scan.close() scan.close scan String[] args args public static void check(String[] ce,int n){
    // AC,TLE,WA,RE
    int countA = 0, countT = 0, countW = 0, countR = 0;
   // System.out.println(n);
    int i = 0;
    while(i < n){
  //    System.out.println("ok");
      if(ce[i].equals("AC")){
        countA = countA + 1;
      }else if(ce[i].equals("TLE")){
        countT = countT + 1;
      }else if(ce[i].equals("WA")){
        countW = countW + 1;
      }else if(ce[i].equals("RE")){
        countR = countR + 1;
      }
      i++;
    }
    System.out.println("AC x "+countA);
    System.out.println("WA x "+countW);
    System.out.println("TLE x "+countT);
    System.out.println("RE x "+countR);
    return;
      } check {
    // AC,TLE,WA,RE
    int countA = 0, countT = 0, countW = 0, countR = 0;
   // System.out.println(n);
    int i = 0;
    while(i < n){
  //    System.out.println("ok");
      if(ce[i].equals("AC")){
        countA = countA + 1;
      }else if(ce[i].equals("TLE")){
        countT = countT + 1;
      }else if(ce[i].equals("WA")){
        countW = countW + 1;
      }else if(ce[i].equals("RE")){
        countR = countR + 1;
      }
      i++;
    }
    System.out.println("AC x "+countA);
    System.out.println("WA x "+countW);
    System.out.println("TLE x "+countT);
    System.out.println("RE x "+countR);
    return;
      } int countA = 0 countA 0 countT = 0 countT 0 countW = 0 countW 0 countR = 0; countR 0 int i = 0; i 0 while(i < n){
  //    System.out.println("ok");
      if(ce[i].equals("AC")){
        countA = countA + 1;
      }else if(ce[i].equals("TLE")){
        countT = countT + 1;
      }else if(ce[i].equals("WA")){
        countW = countW + 1;
      }else if(ce[i].equals("RE")){
        countR = countR + 1;
      }
      i++;
    } i < n i n {
  //    System.out.println("ok");
      if(ce[i].equals("AC")){
        countA = countA + 1;
      }else if(ce[i].equals("TLE")){
        countT = countT + 1;
      }else if(ce[i].equals("WA")){
        countW = countW + 1;
      }else if(ce[i].equals("RE")){
        countR = countR + 1;
      }
      i++;
    } if(ce[i].equals("AC")){
        countA = countA + 1;
      }else if(ce[i].equals("TLE")){
        countT = countT + 1;
      }else if(ce[i].equals("WA")){
        countW = countW + 1;
      }else if(ce[i].equals("RE")){
        countR = countR + 1;
      } ce[i].equals("AC") ce[i].equals ce[i] ce i "AC" {
        countA = countA + 1;
      } countA = countA + 1 countA countA + 1 countA 1 if(ce[i].equals("TLE")){
        countT = countT + 1;
      }else if(ce[i].equals("WA")){
        countW = countW + 1;
      }else if(ce[i].equals("RE")){
        countR = countR + 1;
      } ce[i].equals("TLE") ce[i].equals ce[i] ce i "TLE" {
        countT = countT + 1;
      } countT = countT + 1 countT countT + 1 countT 1 if(ce[i].equals("WA")){
        countW = countW + 1;
      }else if(ce[i].equals("RE")){
        countR = countR + 1;
      } ce[i].equals("WA") ce[i].equals ce[i] ce i "WA" {
        countW = countW + 1;
      } countW = countW + 1 countW countW + 1 countW 1 if(ce[i].equals("RE")){
        countR = countR + 1;
      } ce[i].equals("RE") ce[i].equals ce[i] ce i "RE" {
        countR = countR + 1;
      } countR = countR + 1 countR countR + 1 countR 1 i++ i System.out.println("AC x "+countA) System.out.println System.out System System.out "AC x "+countA "AC x " countA System.out.println("WA x "+countW) System.out.println System.out System System.out "WA x "+countW "WA x " countW System.out.println("TLE x "+countT) System.out.println System.out System System.out "TLE x "+countT "TLE x " countT System.out.println("RE x "+countR) System.out.println System.out System System.out "RE x "+countR "RE x " countR return; String[] ce ce int n n public class Main {
    public static void main(String[] args) {
      // AC,TLE,WA,RE
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      int N;
      int i = 0; 
      while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      String List[] = list.get(0).split(" ",0);
      N = Integer.parseInt(List[0]);
  //    System.out.println(N);
      String ce[] = new String[N];
      while(i < N){
        ce[i] = list.get(i + 1);
        i++;
      }
 //     System.out.println(ce[5]);
      check(ce,N);
   
      scan.close();
    }
  
  public static void check(String[] ce,int n){
    // AC,TLE,WA,RE
    int countA = 0, countT = 0, countW = 0, countR = 0;
   // System.out.println(n);
    int i = 0;
    while(i < n){
  //    System.out.println("ok");
      if(ce[i].equals("AC")){
        countA = countA + 1;
      }else if(ce[i].equals("TLE")){
        countT = countT + 1;
      }else if(ce[i].equals("WA")){
        countW = countW + 1;
      }else if(ce[i].equals("RE")){
        countR = countR + 1;
      }
      i++;
    }
    System.out.println("AC x "+countA);
    System.out.println("WA x "+countW);
    System.out.println("TLE x "+countT);
    System.out.println("RE x "+countR);
    return;
      }
} public class Main {
    public static void main(String[] args) {
      // AC,TLE,WA,RE
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      int N;
      int i = 0; 
      while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      String List[] = list.get(0).split(" ",0);
      N = Integer.parseInt(List[0]);
  //    System.out.println(N);
      String ce[] = new String[N];
      while(i < N){
        ce[i] = list.get(i + 1);
        i++;
      }
 //     System.out.println(ce[5]);
      check(ce,N);
   
      scan.close();
    }
  
  public static void check(String[] ce,int n){
    // AC,TLE,WA,RE
    int countA = 0, countT = 0, countW = 0, countR = 0;
   // System.out.println(n);
    int i = 0;
    while(i < n){
  //    System.out.println("ok");
      if(ce[i].equals("AC")){
        countA = countA + 1;
      }else if(ce[i].equals("TLE")){
        countT = countT + 1;
      }else if(ce[i].equals("WA")){
        countW = countW + 1;
      }else if(ce[i].equals("RE")){
        countR = countR + 1;
      }
      i++;
    }
    System.out.println("AC x "+countA);
    System.out.println("WA x "+countW);
    System.out.println("TLE x "+countT);
    System.out.println("RE x "+countR);
    return;
      }
} Main
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
 
public class Main {
    public static void main(String[] args) {
      // AC,TLE,WA,RE
        Scanner scan = new Scanner(System.in);
      ArrayList<String> list = new ArrayList<String>();
      int N;
      int i = 0; 
      while (scan.hasNextLine()) {
      String an = scan.nextLine();
      list.add(an);
      }
      String List[] = list.get(0).split(" ",0);
      N = Integer.parseInt(List[0]);
  //    System.out.println(N);
      String ce[] = new String[N];
      while(i < N){
        ce[i] = list.get(i + 1);
        i++;
      }
 //     System.out.println(ce[5]);
      check(ce,N);
   
      scan.close();
    }
  
  public static void check(String[] ce,int n){
    // AC,TLE,WA,RE
    int countA = 0, countT = 0, countW = 0, countR = 0;
   // System.out.println(n);
    int i = 0;
    while(i < n){
  //    System.out.println("ok");
      if(ce[i].equals("AC")){
        countA = countA + 1;
      }else if(ce[i].equals("TLE")){
        countT = countT + 1;
      }else if(ce[i].equals("WA")){
        countW = countW + 1;
      }else if(ce[i].equals("RE")){
        countR = countR + 1;
      }
      i++;
    }
    System.out.println("AC x "+countA);
    System.out.println("WA x "+countW);
    System.out.println("TLE x "+countT);
    System.out.println("RE x "+countR);
    return;
      }
}
    