#include <bits/stdc++.h>
using namespace std;
int N;
vector<int> data;
int main() {
  int n;
  string s;
  cin >> N;
  int C0 = 0;
  int C1 = 0;
  int C2 = 0;
  int C3 = 0;
  int C4 = 0;
  for (int i = 0; i < N; i++) {
    cin >> s;
    if (s == "AC") {
      C0++;
    } else if (s == "WA") {
      C1++;
    } else if (s == "TLE") {
      C3++;
    } else if (s == "RE") {
      C4++;
    }
  }
  cout << "AC × " << C0 << "\n";
  cout << "WA × " << C1 << "\n";
  cout << "TLE × " << C3 << "\n";
  cout << "RE × " << C4 << "\n";
  return 0;
}
