#include <bits/stdc++.h>
using namespace std;
int main() {
  long N, A = 0, B = 0, C = 0, D = 0;
  cin >> N;
  vector<string> a(N);
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    if (a[i] == "AC") {
      A++;
    } else if (a[i] == "WA") {
      B++;
    } else if (a[i] == "TLE") {
      C++;
    } else if (a[i] == "RE") {
      D++;
    }
  }
  cout << "AC"
       << " "
       << "×"
       << " " << A << endl;
  cout << "WA"
       << " "
       << "×"
       << " " << B << endl;
  cout << "TLE"
       << " "
       << "×"
       << " " << C << endl;
  cout << "RE"
       << " "
       << "×"
       << " " << D << endl;
}
