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