import java.util.*;

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

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