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