#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  map<string, int> C;
  C["AC"] = 0;
  C["WA"] = 0;
  C["TLE"] = 0;
  C["RE"] = 0;
  string s;
  for (int i = 0; i < (int)(N); i++) {
    cin >> s;
    C.at(s)++;
  }
  cout << "AC × " << C.at("AC") << endl;
  cout << "WA × " << C.at("WA") << endl;
  cout << "TLE × " << C.at("TLE") << endl;
  cout << "RE × " << C.at("RE") << endl;
}
