#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  unordered_map<string, int> m;
  for (int i = 0; i < n; ++i) {
    string s;
    cin >> s;
    m[s]++;
  }
  cout << "AC x " << to_string(m["AC"]) << endl;
  cout << "WA x " << to_string(m["WA"]) << endl;
  cout << "LTE x " << to_string(m["TLE"]) << endl;
  cout << "RE x " << to_string(m["RE"]) << endl;
  return 0;
}
