#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int AC = 0, WA = 0, TLE = 0, RE = 0;
  for (int i = 0; i < n; i++) {
    char c[5];
    scanf("%s", c);
    if (!strcmp(c, "AC")) {
      AC++;
    } else if (!strcmp(c, "WA")) {
      WA++;
    } else if (!strcmp(c, "TLE")) {
      TLE++;
    } else {
      RE++;
    }
  }
  printf("AC × %d\n", AC);
  printf("WA × %d\n", WA);
  printf("TLE × %d\n", TLE);
  printf("RE × %d\n", RE);
}
