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