#include <bits/stdc++.h>
using namespace std;
int N;
int AC;
int WA;
int TLE;
int RE;
string tmp;
int main() {
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> tmp;
    if (tmp == "AC") {
      AC++;
    } else if (tmp == "WA") {
      WA++;
    } else if (tmp == "TLE") {
      TLE++;
    } else if (tmp == "RE") {
      RE++;
    }
  }
  printf("AC × %d\n", AC);
  printf("WA × %d\n", WA);
  printf("TLE × %d\n", TLE);
  printf("RE × %d\n", RE);
}
