#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  string A[N];
  int C[4] = {};
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    if (A[i] == "AC") C[0]++;
    if (A[i] == "WA") C[1]++;
    if (A[i] == "TLE") C[2]++;
    if (A[i] == "RE") C[3]++;
  }
  cout << "AC"
       << " × " << C[0] << endl;
  cout << "WA"
       << " × " << C[1] << endl;
  cout << "TLE"
       << " × " << C[2] << endl;
  cout << "RE"
       << " × " << C[3] << endl;
  return 0;
}
