#include <bits/stdc++.h>
using namespace std;
inline long long gcd(long long a, long long b) {
  return (a % b == 0 ? b : gcd(b, a % b));
}
inline long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
inline long long char_to_ll(char c) { return (int)(c - '0'); }
inline long long string_to_ll(string s) { return atoi(s.c_str()); }
inline bool is_prime(long long x) {
  if (x <= 1) return false;
  for (long long i = 2; sqrt(i) <= x; i++)
    if (x % i == 0) return false;
  return true;
}
int main() {
  int n, ac = 0, wa = 0, tle = 0, re = 0;
  cin >> n;
  vector<string> a(n);
  for (int i = (0); i < (n); ++i) cin >> a.at(i);
  for (int i = (0); i < (n); ++i) {
    if (a.at(i) == "AC") {
      ac++;
    } else if (a.at(i) == "WA") {
      wa++;
    } else if (a.at(i) == "TLE") {
      tle++;
    } else {
      re++;
    }
  }
  cout << "AC × " << ac << endl;
  cout << "WA × " << wa << endl;
  cout << "TLE × " << tle << endl;
  cout << "RE × " << re << endl;
  return 0;
}
