#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  char s[100];
  int a[4];
  a[0] = 0;
  a[1] = 0;
  a[2] = 0;
  a[3] = 0;
  for (int i = 0; i < n; i++) {
    scanf("%s", s);
    if (s[0] == 'A') {
      a[0] = a[0] + 1;
    } else if (s[0] == 'W') {
      a[1] = a[1] + 1;
    } else if (s[0] == 'T') {
      a[2] = a[2] + 1;
    } else if (s[0] == 'R') {
      a[3] = a[3] + 1;
    }
  }
  printf("AC × %d\n", a[0]);
  printf("WA × %d\n", a[1]);
  printf("TLE × %d\n", a[2]);
  printf("RE × %d\n", a[3]);
  return 0;
}
