#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, ac = 0, wa = 0, tle = 0, re = 0;
  cin >> N;
  char s[10], s1[10] = {"AC"}, s2[10] = {"WA"}, s3[10] = {"TLE"},
              s4[10] = {"RE"};
  while (N--) {
    cin >> s;
    if (strcmp(s, s1) == 0)
      ac++;
    else if (strcmp(s, s2) == 0)
      wa++;
    else if (strcmp(s, s3) == 0)
      tle++;
    else if (strcmp(s, s4) == 0)
      re++;
  }
  printf("AC × %d\nWA × %d\nTLE × %d\nRE × %d\n", ac, wa, tle, re);
  return 0;
}
