#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a = 0, w = 0, t = 0, r = 0;
  cin >> n;
  string s;
  for (int i = 0; i < n; i++) {
    cin >> s;
    if (s == "AC") a++;
    if (s == "WA") w++;
    if (s == "TLE") t++;
    if (s == "RE") r++;
  }
  cout << "AC × " << a << endl;
  cout << "WA × " << w << endl;
  cout << "TLE × " << t << endl;
  cout << "RE × " << r << endl;
}
