#include <bits/stdc++.h>
int main() {
  int N;
  char S[100], a[20] = "AC", b[20] = "WA", c[20] = "TLE", d[20] = "RE";
  int i, c0 = 0, c1 = 0, c2 = 0, c3 = 0;
  scanf("%d", &N);
  for (i = 0; i < N; i++) {
    scanf("%s", S);
    if (strcmp(S, a) == 0) {
      c0++;
    } else if (strcmp(S, b) == 0) {
      c1++;
    } else if (strcmp(S, c) == 0) {
      c2++;
    } else 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;
}
