#include <bits/stdc++.h>
int main() {
  long long int Zx = 0, Xy = 0, Yz = 0, xyz = 0, count;
  scanf("%d", &count);
  char kata[4];
  for (int u = 0; u < count; u++) {
    scanf("%s", &kata);
    switch (kata[0]) {
      case 'C':
        Zx++;
        break;
      case 'W':
        Xy++;
        break;
      case 'L':
        Yz++;
        break;
      case 'R':
        xyz++;
        break;
    }
  }
  printf("AC %d\nWA %d\nTLE %d\nRE %d\n");
  return 0;
}
