#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  int a = 0, b = 0, c = 0, d = 0;
  cin >> N;
  for (int i = 0; i < (int)(N + 1); i++) {
    string test;
    getline(cin, test);
    if (test == "AC") a++;
    if (test == "WA") b++;
    if (test == "TLE") c++;
    if (test == "RE") d++;
  }
  cout << "AC × " << a << endl;
  cout << "WA × " << b << endl;
  cout << "TLE × " << c << endl;
  cout << "RE × " << d << endl;
}
