#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int x, long long int y) {
  return y ? gcd(y, x % y) : x;
}
long long int lcm(long long int x, long long int y) {
  return x / gcd(x, y) * y;
}
vector<pair<long long int, int>> factorize(long long int n) {
  vector<pair<long long int, int>> res;
  for (long long int i = 2; i * i <= n; ++i) {
    if (n % i) continue;
    res.emplace_back(i, 0);
    while (n % i == 0) {
      n /= i;
      res.back().second++;
    }
  }
  if (n != 1) res.emplace_back(n, 1);
  return res;
}
long long int mod = 998244353;
int main() {
  int n;
  cin >> n;
  vector<string> s(n);
  for (int i = 0; i < n; i++) {
    cin >> s.at(i);
  }
  int c[4] = {0, 0, 0, 0};
  for (int i = 0; i < n; i++) {
    if (s[i] == "AC") c[0]++;
    if (s[i] == "WA") c[1]++;
    if (s[i] == "TLE") c[2]++;
    if (s[i] == "RE") c[3]++;
  }
  cout << "AC"
       << " × " << c[0] << endl;
  cout << "WA"
       << " × " << c[1] << endl;
  cout << "TLE"
       << " × " << c[2] << endl;
  cout << "RE"
       << " × " << c[3] << endl;
}
