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