#include <bits/stdc++.h>
using namespace std;

int main(){
  int N, A, W, T, R;
  A = 0;
  W = 0;
  T = 0;
  R = 0;
  
  string S;
  cin >> N;
  
  for(int i = 0; i < N; i++){
   cin >> S.at(i); 
   switch(S.at(i)){
     case "AC":
       A++;
       break;
     case "WA":
       W++;
       break;
     case "TLE":
       T++;
       break;
     case "RE":
       R++;
       break;
   }
    
    cout << "AC × " << A << endl;
    cout << "WA × " << W << endl;
    cout << "TLE × " << T << endl;
    cout << "RE × " << R << endl;
  }
  
  
 return 0; 
}
