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