#include <bits/stdc++.h>
int main(void) {
  int N;
  char S[100000][4];
  int c0 = 0, c1 = 0, c2 = 0, c3 = 0;
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%s", &S[i]);
  }
  for (int i = 0; i < N; i++) {
    switch (S[i][0]) {
      case 'A':
        c0++;
        break;
      case 'W':
        c1++;
        break;
      case 'T':
        c2++;
        break;
      default:
        c3++;
        break;
    }
  }
  printf("AC × %d\n", c0);
  printf("WA × %d\n", c1);
  printf("TLE × %d\n", c2);
  printf("RE × %d\n", c3);
}
