#include <bits/stdc++.h>
using namespace std;
using ll = long long;
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;
}
