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