#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int ngcd(vector<int>& a) {
  int res;
  res = a.at(0);
  for (int i = 1; i < a.size() && res != 1; i++) {
    res = gcd(a.at(i), res);
  }
  return res;
}
int lcm(int a, int b) { return a / gcd(a, b) * b; }
int nlcm(vector<int> numbers) {
  int res;
  res = numbers.at(0);
  for (int i = 0; i < numbers.size(); i++) {
    res = lcm(res, numbers[i]);
  }
  return res;
}
bool isPrime(int x) {
  if (x < 2)
    return 0;
  else if (x == 2)
    return 1;
  if (x % 2 == 0) return 0;
  for (int i = 3; i * i <= x; i += 2)
    if (x % i == 0) return 0;
  return 1;
}
int digsum(int n) {
  int res = 0;
  while (n > 0) {
    res += n % 10;
    n /= 10;
  }
  return res;
}
vector<int> enum_div(int n) {
  vector<int> ret;
  for (int i = 1; i * i <= n; ++i) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i != 1 && i * i != n) {
        ret.push_back(n / i);
      }
    }
  }
  return ret;
}
long long int mod_pow(long long int x, long long int n, long long int mod) {
  long long int res = 1;
  while (n > 0) {
    if (n & 1) res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}
int stringcount(string s, char c) { return count(s.cbegin(), s.cend(), c); }
int main() {
  long long N;
  string s;
  long long ans[4] = {0, 0, 0, 0};
  cin >> N;
  for (long long i = 0; i < (long long)(N); i++) {
    cin >> s;
    if (s.at(0) == 'A')
      ans[0]++;
    else if (s.at(0) == 'W')
      ans[1]++;
    else if (s.at(0) == 'T')
      ans[2]++;
    else if (s.at(0) == 'R')
      ans[3]++;
  }
  cout << "AC × " << ans[0] << endl;
  cout << "WA × " << ans[1] << endl;
  cout << "TLE × " << ans[2] << endl;
  cout << "RE × " << ans[3] << endl;
}
