#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N;
  cin >> N;
  map<string, long long> mp;
  for (long long i = 0; i < N; i++) {
    string s;
    cin >> s;
    mp[s]++;
  }
  printf("AC × %d\n", mp["AC"]);
  printf("WA × %d\n", mp["WA"]);
  printf("TLE × %d\n", mp["TLE"]);
  printf("RE × %d\n", mp["RE"]);
  return 0;
}
