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