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

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int acN = 0;
    int waN = 0;
    int tleN = 0;
    int reN = 0;
    for (int cnt = 0; cnt < n; cnt++) {
      String input = sc.next();
      if (input.equals("AC")) {
        acN++;
      }
      if (input.equals("WA")) {
        waN++;
      }
      if (input.equals("TLE")) {
        tleN++;
      }
      if (input.equals("RE")) {
        reN++;
      }
    }

    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 n = sc.nextInt();
    int acN = 0;
    int waN = 0;
    int tleN = 0;
    int reN = 0;
    for (int cnt = 0; cnt < n; cnt++) {
      String input = sc.next();
      if (input.equals("AC")) {
        acN++;
      }
      if (input.equals("WA")) {
        waN++;
      }
      if (input.equals("TLE")) {
        tleN++;
      }
      if (input.equals("RE")) {
        reN++;
      }
    }

    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 n = sc.nextInt();
    int acN = 0;
    int waN = 0;
    int tleN = 0;
    int reN = 0;
    for (int cnt = 0; cnt < n; cnt++) {
      String input = sc.next();
      if (input.equals("AC")) {
        acN++;
      }
      if (input.equals("WA")) {
        waN++;
      }
      if (input.equals("TLE")) {
        tleN++;
      }
      if (input.equals("RE")) {
        reN++;
      }
    }

    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 n = sc.nextInt();
    int acN = 0;
    int waN = 0;
    int tleN = 0;
    int reN = 0;
    for (int cnt = 0; cnt < n; cnt++) {
      String input = sc.next();
      if (input.equals("AC")) {
        acN++;
      }
      if (input.equals("WA")) {
        waN++;
      }
      if (input.equals("TLE")) {
        tleN++;
      }
      if (input.equals("RE")) {
        reN++;
      }
    }

    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 n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int acN = 0; acN 0 int waN = 0; waN 0 int tleN = 0; tleN 0 int reN = 0; reN 0 for (int cnt = 0; cnt < n; cnt++) {
      String input = sc.next();
      if (input.equals("AC")) {
        acN++;
      }
      if (input.equals("WA")) {
        waN++;
      }
      if (input.equals("TLE")) {
        tleN++;
      }
      if (input.equals("RE")) {
        reN++;
      }
    } int cnt = 0; int cnt = 0; cnt 0 cnt < n cnt n cnt++ cnt++ cnt {
      String input = sc.next();
      if (input.equals("AC")) {
        acN++;
      }
      if (input.equals("WA")) {
        waN++;
      }
      if (input.equals("TLE")) {
        tleN++;
      }
      if (input.equals("RE")) {
        reN++;
      }
    } {
      String input = sc.next();
      if (input.equals("AC")) {
        acN++;
      }
      if (input.equals("WA")) {
        waN++;
      }
      if (input.equals("TLE")) {
        tleN++;
      }
      if (input.equals("RE")) {
        reN++;
      }
    } String input = sc.next(); input sc.next() sc.next sc if (input.equals("AC")) {
        acN++;
      } input.equals("AC") input.equals input "AC" {
        acN++;
      } acN++ acN if (input.equals("WA")) {
        waN++;
      } input.equals("WA") input.equals input "WA" {
        waN++;
      } waN++ waN if (input.equals("TLE")) {
        tleN++;
      } input.equals("TLE") input.equals input "TLE" {
        tleN++;
      } tleN++ tleN if (input.equals("RE")) {
        reN++;
      } input.equals("RE") input.equals input "RE" {
        reN++;
      } reN++ reN 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 n = sc.nextInt();
    int acN = 0;
    int waN = 0;
    int tleN = 0;
    int reN = 0;
    for (int cnt = 0; cnt < n; cnt++) {
      String input = sc.next();
      if (input.equals("AC")) {
        acN++;
      }
      if (input.equals("WA")) {
        waN++;
      }
      if (input.equals("TLE")) {
        tleN++;
      }
      if (input.equals("RE")) {
        reN++;
      }
    }

    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 n = sc.nextInt();
    int acN = 0;
    int waN = 0;
    int tleN = 0;
    int reN = 0;
    for (int cnt = 0; cnt < n; cnt++) {
      String input = sc.next();
      if (input.equals("AC")) {
        acN++;
      }
      if (input.equals("WA")) {
        waN++;
      }
      if (input.equals("TLE")) {
        tleN++;
      }
      if (input.equals("RE")) {
        reN++;
      }
    }

    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 n = sc.nextInt();
    int acN = 0;
    int waN = 0;
    int tleN = 0;
    int reN = 0;
    for (int cnt = 0; cnt < n; cnt++) {
      String input = sc.next();
      if (input.equals("AC")) {
        acN++;
      }
      if (input.equals("WA")) {
        waN++;
      }
      if (input.equals("TLE")) {
        tleN++;
      }
      if (input.equals("RE")) {
        reN++;
      }
    }

    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();
  }
}
