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