import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int num = sc.nextInt();
    int ac = 0;
    int wa = 0;
    int tle = 0;
    int re = 0;
    for(int i = 0;i < num;i++){
      String line = sc.next();
      if(line.equals("AC")){
        ac++;
      }
      else if(line.equals("WA")){
        wa++;
      }
      else if(line.equals("TLE")){
        tle++;
      }
      else{
        re++;
      }
    }
    System.out.println("AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re);
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int num = sc.nextInt();
    int ac = 0;
    int wa = 0;
    int tle = 0;
    int re = 0;
    for(int i = 0;i < num;i++){
      String line = sc.next();
      if(line.equals("AC")){
        ac++;
      }
      else if(line.equals("WA")){
        wa++;
      }
      else if(line.equals("TLE")){
        tle++;
      }
      else{
        re++;
      }
    }
    System.out.println("AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int num = sc.nextInt();
    int ac = 0;
    int wa = 0;
    int tle = 0;
    int re = 0;
    for(int i = 0;i < num;i++){
      String line = sc.next();
      if(line.equals("AC")){
        ac++;
      }
      else if(line.equals("WA")){
        wa++;
      }
      else if(line.equals("TLE")){
        tle++;
      }
      else{
        re++;
      }
    }
    System.out.println("AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re);
  } main {
    Scanner sc = new Scanner(System.in);
    int num = sc.nextInt();
    int ac = 0;
    int wa = 0;
    int tle = 0;
    int re = 0;
    for(int i = 0;i < num;i++){
      String line = sc.next();
      if(line.equals("AC")){
        ac++;
      }
      else if(line.equals("WA")){
        wa++;
      }
      else if(line.equals("TLE")){
        tle++;
      }
      else{
        re++;
      }
    }
    System.out.println("AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc int ac = 0; ac 0 int wa = 0; wa 0 int tle = 0; tle 0 int re = 0; re 0 for(int i = 0;i < num;i++){
      String line = sc.next();
      if(line.equals("AC")){
        ac++;
      }
      else if(line.equals("WA")){
        wa++;
      }
      else if(line.equals("TLE")){
        tle++;
      }
      else{
        re++;
      }
    } int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
      String line = sc.next();
      if(line.equals("AC")){
        ac++;
      }
      else if(line.equals("WA")){
        wa++;
      }
      else if(line.equals("TLE")){
        tle++;
      }
      else{
        re++;
      }
    } {
      String line = sc.next();
      if(line.equals("AC")){
        ac++;
      }
      else if(line.equals("WA")){
        wa++;
      }
      else if(line.equals("TLE")){
        tle++;
      }
      else{
        re++;
      }
    } String line = sc.next(); line sc.next() sc.next sc if(line.equals("AC")){
        ac++;
      }
      else if(line.equals("WA")){
        wa++;
      }
      else if(line.equals("TLE")){
        tle++;
      }
      else{
        re++;
      } line.equals("AC") line.equals line "AC" {
        ac++;
      } ac++ ac if(line.equals("WA")){
        wa++;
      }
      else if(line.equals("TLE")){
        tle++;
      }
      else{
        re++;
      } line.equals("WA") line.equals line "WA" {
        wa++;
      } wa++ wa if(line.equals("TLE")){
        tle++;
      }
      else{
        re++;
      } line.equals("TLE") line.equals line "TLE" {
        tle++;
      } tle++ tle {
        re++;
      } re++ re System.out.println("AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re) System.out.println System.out System System.out "AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re "\nRE x " tle "\nTLE x " wa "\nWA x " "AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re "AC x " ac "\nWA x " wa "\nTLE x " tle "\nRE x " re String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int num = sc.nextInt();
    int ac = 0;
    int wa = 0;
    int tle = 0;
    int re = 0;
    for(int i = 0;i < num;i++){
      String line = sc.next();
      if(line.equals("AC")){
        ac++;
      }
      else if(line.equals("WA")){
        wa++;
      }
      else if(line.equals("TLE")){
        tle++;
      }
      else{
        re++;
      }
    }
    System.out.println("AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int num = sc.nextInt();
    int ac = 0;
    int wa = 0;
    int tle = 0;
    int re = 0;
    for(int i = 0;i < num;i++){
      String line = sc.next();
      if(line.equals("AC")){
        ac++;
      }
      else if(line.equals("WA")){
        wa++;
      }
      else if(line.equals("TLE")){
        tle++;
      }
      else{
        re++;
      }
    }
    System.out.println("AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re);
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int num = sc.nextInt();
    int ac = 0;
    int wa = 0;
    int tle = 0;
    int re = 0;
    for(int i = 0;i < num;i++){
      String line = sc.next();
      if(line.equals("AC")){
        ac++;
      }
      else if(line.equals("WA")){
        wa++;
      }
      else if(line.equals("TLE")){
        tle++;
      }
      else{
        re++;
      }
    }
    System.out.println("AC x " + ac + "\nWA x " + wa + "\nTLE x " + tle + "\nRE x " + re);
  }
}