#include <bits/stdc++.h>
int main(void) {
  int N, i, C0 = 0, C1 = 0, C2 = 0, C3 = 0;
  char S[100], a[3] = "AC", b[3] = "WA", c[4] = "TLE", d[3] = "RE";
  scanf("%d", &N);
  for (i = 0; i < N; i++) {
    scanf("%s", S);
    if (strcmp(S, a) == 0) {
      C0++;
    }
    if (strcmp(S, b) == 0) {
      C1++;
    }
    if (strcmp(S, c) == 0) {
      C2++;
    }
    if (strcmp(S, d) == 0) {
      C3++;
    }
  }
  printf("AC × %d\n", C0);
  printf("WA × %d\n", C1);
  printf("TLE × %d\n", C2);
  printf("RE × %d\n", C3);
  return 0;
}
