#include <bits/stdc++.h>
int main(void) {
  int n;
  int c0 = 0, c1 = 0, c2 = 0, c3 = 0;
  scanf("%d", &n);
  char *S[100];
  for (int i = 0; i < n; i++) {
    scanf("%s\n", *S);
    if (strcmp(*S, "AC") == 0) {
      c0++;
    } else if (strcmp(*S, "WA") == 0) {
      c1++;
    } else if (strcmp(*S, "TLE") == 0) {
      c2++;
    } else if (strcmp(*S, "RE") == 0) {
      c3++;
    }
  }
  printf("AC × %d\n", c0);
  printf("WA × %d\n", c1);
  printf("TLE × %d\n", c2);
  printf("RE × %d\n", c3);
}
