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