#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, Ac = 0, Wc = 0, Tc = 0, Rc = 0;
  cin >> N;
  string str[N];
  for (int i = 0; i < N; i++) {
    cin >> str[i];
    if (str[i] == "AC") Ac++;
    if (str[i] == "WA") Wc++;
    if (str[i] == "TLE") Tc++;
    if (str[i] == "RE") Rc++;
  }
  cout << "AC × " << Ac << endl;
  cout << "WA × " << Wc << endl;
  cout << "TLE × " << Tc << endl;
  cout << "RE × " << Rc << endl;
}
