#include <bits/stdc++.h>
int main() {
  int n;
  std::map<std::string, int> mp;
  std::cin >> n;
  for (int i = 0; i < n; i++) {
    std::string tmp;
    std::cin >> tmp;
    mp[tmp]++;
  }
  std::cout << "AC × " << mp["AC"] << std::endl;
  std::cout << "WA × " << mp["WA"] << std::endl;
  std::cout << "TLE × " << mp["TLE"] << std::endl;
  std::cout << "RE × " << mp["RE"] << std::endl;
  return 0;
}
