import java.util.Scanner;
import java.util.Arrays;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int acN = 0;
    int waN = 0;
    int tleN = 0;
    int reN = 0;
    int n = sc.nextInt();
    for (int cnt = 0; cnt < n; cnt++) {
      String s = sc.next();
      switch (s) {
        case "AC":
          acN++;
          break;
        case "WA":
          waN++;
          break;
        case "TLE":
          tleN++;
          break;
        case "RE":
          reN++;
          break;
      }
    }
    System.out.println("AC x " + acN);
    System.out.println("WA x " + waN);
    System.out.println("TLE x " + tleN);
    System.out.println("RE x " + reN);
    sc.close();
  }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int acN = 0;
    int waN = 0;
    int tleN = 0;
    int reN = 0;
    int n = sc.nextInt();
    for (int cnt = 0; cnt < n; cnt++) {
      String s = sc.next();
      switch (s) {
        case "AC":
          acN++;
          break;
        case "WA":
          waN++;
          break;
        case "TLE":
          tleN++;
          break;
        case "RE":
          reN++;
          break;
      }
    }
    System.out.println("AC x " + acN);
    System.out.println("WA x " + waN);
    System.out.println("TLE x " + tleN);
    System.out.println("RE x " + reN);
    sc.close();
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int acN = 0;
    int waN = 0;
    int tleN = 0;
    int reN = 0;
    int n = sc.nextInt();
    for (int cnt = 0; cnt < n; cnt++) {
      String s = sc.next();
      switch (s) {
        case "AC":
          acN++;
          break;
        case "WA":
          waN++;
          break;
        case "TLE":
          tleN++;
          break;
        case "RE":
          reN++;
          break;
      }
    }
    System.out.println("AC x " + acN);
    System.out.println("WA x " + waN);
    System.out.println("TLE x " + tleN);
    System.out.println("RE x " + reN);
    sc.close();
  } main {
    Scanner sc = new Scanner(System.in);
    int acN = 0;
    int waN = 0;
    int tleN = 0;
    int reN = 0;
    int n = sc.nextInt();
    for (int cnt = 0; cnt < n; cnt++) {
      String s = sc.next();
      switch (s) {
        case "AC":
          acN++;
          break;
        case "WA":
          waN++;
          break;
        case "TLE":
          tleN++;
          break;
        case "RE":
          reN++;
          break;
      }
    }
    System.out.println("AC x " + acN);
    System.out.println("WA x " + waN);
    System.out.println("TLE x " + tleN);
    System.out.println("RE x " + reN);
    sc.close();
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int acN = 0; acN 0 int waN = 0; waN 0 int tleN = 0; tleN 0 int reN = 0; reN 0 int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc for (int cnt = 0; cnt < n; cnt++) {
      String s = sc.next();
      switch (s) {
        case "AC":
          acN++;
          break;
        case "WA":
          waN++;
          break;
        case "TLE":
          tleN++;
          break;
        case "RE":
          reN++;
          break;
      }
    } int cnt = 0; int cnt = 0; cnt 0 cnt < n cnt n cnt++ cnt++ cnt {
      String s = sc.next();
      switch (s) {
        case "AC":
          acN++;
          break;
        case "WA":
          waN++;
          break;
        case "TLE":
          tleN++;
          break;
        case "RE":
          reN++;
          break;
      }
    } {
      String s = sc.next();
      switch (s) {
        case "AC":
          acN++;
          break;
        case "WA":
          waN++;
          break;
        case "TLE":
          tleN++;
          break;
        case "RE":
          reN++;
          break;
      }
    } String s = sc.next(); s sc.next() sc.next sc switch (s) {
        case "AC":
          acN++;
          break;
        case "WA":
          waN++;
          break;
        case "TLE":
          tleN++;
          break;
        case "RE":
          reN++;
          break;
      } s case "AC": "AC" case "AC": acN++ acN break; case "WA": "WA" case "WA": waN++ waN break; case "TLE": "TLE" case "TLE": tleN++ tleN break; case "RE": "RE" case "RE": reN++ reN break; System.out.println("AC x " + acN) System.out.println System.out System System.out "AC x " + acN "AC x " acN System.out.println("WA x " + waN) System.out.println System.out System System.out "WA x " + waN "WA x " waN System.out.println("TLE x " + tleN) System.out.println System.out System System.out "TLE x " + tleN "TLE x " tleN System.out.println("RE x " + reN) System.out.println System.out System System.out "RE x " + reN "RE x " reN sc.close() sc.close sc String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int acN = 0;
    int waN = 0;
    int tleN = 0;
    int reN = 0;
    int n = sc.nextInt();
    for (int cnt = 0; cnt < n; cnt++) {
      String s = sc.next();
      switch (s) {
        case "AC":
          acN++;
          break;
        case "WA":
          waN++;
          break;
        case "TLE":
          tleN++;
          break;
        case "RE":
          reN++;
          break;
      }
    }
    System.out.println("AC x " + acN);
    System.out.println("WA x " + waN);
    System.out.println("TLE x " + tleN);
    System.out.println("RE x " + reN);
    sc.close();
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int acN = 0;
    int waN = 0;
    int tleN = 0;
    int reN = 0;
    int n = sc.nextInt();
    for (int cnt = 0; cnt < n; cnt++) {
      String s = sc.next();
      switch (s) {
        case "AC":
          acN++;
          break;
        case "WA":
          waN++;
          break;
        case "TLE":
          tleN++;
          break;
        case "RE":
          reN++;
          break;
      }
    }
    System.out.println("AC x " + acN);
    System.out.println("WA x " + waN);
    System.out.println("TLE x " + tleN);
    System.out.println("RE x " + reN);
    sc.close();
  }
} Main
import java.util.Scanner;
import java.util.Arrays;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int acN = 0;
    int waN = 0;
    int tleN = 0;
    int reN = 0;
    int n = sc.nextInt();
    for (int cnt = 0; cnt < n; cnt++) {
      String s = sc.next();
      switch (s) {
        case "AC":
          acN++;
          break;
        case "WA":
          waN++;
          break;
        case "TLE":
          tleN++;
          break;
        case "RE":
          reN++;
          break;
      }
    }
    System.out.println("AC x " + acN);
    System.out.println("WA x " + waN);
    System.out.println("TLE x " + tleN);
    System.out.println("RE x " + reN);
    sc.close();
  }
}