#include <bits/stdc++.h>
void output();
int num[4] = {0, 0, 0, 0};
char target[4][4] = {"AC", "WA", "TLE", "RE"};
int main(void) {
  int i, N;
  char dt[4];
  scanf("%d", &N);
  for (i = 0; i < N; i++) {
    scanf("%s", dt);
    if (strcmp(dt, target[0]) == 0)
      num[0]++;
    else if (strcmp(dt, target[1]) == 0)
      num[1]++;
    else if (strcmp(dt, target[2]) == 0)
      num[2]++;
    else if (strcmp(dt, target[3]) == 0)
      num[3]++;
  }
  output();
  return 0;
}
void output() {
  printf("%s × %d\n", target[0], num[0]);
  printf("%s × %d\n", target[1], num[1]);
  printf("%s × %d\n", target[2], num[2]);
  printf("%s × %d\n", target[3], num[3]);
}
