#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a = 0, b = 0, c = 0, d = 0;
  vector<string> vec(n);
  for (int i = 0; i < n; i++) {
    cin >> vec[i];
    if (vec[i] == "AC") a++;
    if (vec[i] == "WA") b++;
    if (vec[i] == "TLE") c++;
    if (vec[i] == "RE") d++;
  }
  cout << "AC"
       << " "
       << "×"
       << " " << a << endl;
  cout << "WA"
       << " "
       << "×"
       << " " << b << endl;
  cout << "TLE"
       << " "
       << "×"
       << " " << c << endl;
  cout << "RE"
       << " "
       << "×"
       << " " << d << endl;
}
