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