#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  int q = 0, p = 0, e = 0, g = 0;
  string s;
  string a = "A";
  string w = "W";
  string t = "T";
  string r = "R";
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s;
    if (s.find_first_of("A") == 0) {
      q++;
    }
    if (s.find_first_of("W") == 0) {
      p++;
    }
    if (s.find_first_of("T") == 0) {
      e++;
    }
    if (s.find_first_of("R") == 0) {
      g++;
    }
  }
  cout << "AC × " << q << endl;
  cout << "WA × " << p << endl;
  cout << "TLE × " << e << endl;
  cout << "RE × " << g << endl;
  return 0;
}
