#include <bits/stdc++.h>
using namespace std;
int a_1(int a) {
  int x = 0;
  for (int i = 2; i < a; i++) {
    if (a % i == 0) x++;
  }
  if (x == 0) {
    return 0;
  }
  if (x != 0) {
    return 1;
  }
}
int gcd(int a, int b) {
  if (a < b) {
    a ^= b;
    b ^= a;
    a ^= b;
  }
  return b ? gcd(b, a % b) : a;
}
int lcm(int a, int b) { return a * b / gcd(a, b); }
int main() {
  int n, a = 0, b = 0, c = 0, d = 0;
  string s;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s;
    if (s == "AC")
      a++;
    else if (s == "WA")
      b++;
    else if (s == "TLE")
      c++;
    else if (s == "RE")
      d++;
  }
  cout << "AC × " << a << endl;
  cout << "WA × " << b << endl;
  cout << "TLE × " << c << endl;
  cout << "RE × " << d << endl;
  return 0;
}
