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