#include <bits/stdc++.h>
int main() {
  int N, i, a = 0, b = 0, c = 0, d = 0;
  char str[100000][4];
  scanf("%d", &N);
  for (i = 0; i < N; i++) scanf("%s", str[i]);
  for (i = 0; i < N; i++) {
    if (str[i][0] == 'A')
      a++;
    else if (str[i][0] == 'W')
      b++;
    else if (str[i][0] == 'T')
      c++;
    else if (str[i][0] == 'R')
      d++;
  }
  printf("AC × %d\n", a);
  printf("WA × %d\n", b);
  printf("TLE × %d\n", c);
  printf("RE × %d\n", d);
  return 0;
}
