#include <bits/stdc++.h>
int main(void) {
  int n;
  std::cin >> n;
  int a = 0, w = 0, t = 0, r = 0;
  for (int i = 0; i < n; i++) {
    std::string ans;
    std::cin >> ans;
    if (ans == "AC") {
      a++;
    } else if (ans == "WA") {
      w++;
    } else if (ans == "TLE") {
      t++;
    } else {
      r++;
    }
  }
  std::cout << "AC × " << a << std::endl;
  std::cout << "WA × " << w << std::endl;
  std::cout << "TLE × " << t << std::endl;
  std::cout << "RE × " << r << std::endl;
}
