#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  int A = 0;
  int W = 0;
  int T = 0;
  int R = 0;
  cin >> N;
  for(int i = 0; i < N; i++){
    string S[];
    cin >> S[i];
  }
  for(int i = 0; i < N; i++){
    if(S[i] == "AC"){
      A++;
    }else if(S[i] == "WA"){
      W++;
    }else if(S[i] == "TLE"){
      T++;
    }else if(S[i] == "RE"){
      R++;
    }
  }
  cout << "AC × " << A << endl;
  cout << "WA × " << W << endl;
  cout << "TLE × " << T << endl;
  cout << "RE × " << R << endl;
}
  