#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N;
  vector<string> s;
  vector<long long> res(4, 0);
  cin >> N;
  for (unsigned long i = 0; i < N; i++) {
    string line;
    cin >> line;
    s.emplace_back(line);
  }
  for (int i = 0; i < N; i++) {
    if (s[i] == "AC") {
      res[0] += 1;
    } else if (s[i] == "WA") {
      res[1] += 1;
    } else if (s[i] == "TLE") {
      res[2] += 1;
    } else if (s[i] == "RE") {
      res[3] += 1;
    }
  }
  cout << "AC"
       << " × " << res[0] << endl;
  cout << "WA"
       << " × " << res[1] << endl;
  cout << "TLE"
       << " × " << res[2] << endl;
  cout << "RE"
       << " x " << res[3] << endl;
}
