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

int main() {
  int N;
  cin >> N;
  vector<string> test(N);
  for(int i=0; i<N; i++){
    cin >> test.at(i);
  }
  
  int AC=0;
  int WA=0;
  int TLE=0;
  int RE=0;
  for(int i=0; i<N; i++){
    if(test.at(i)=="AC"){
      AC++;
    }
    else if(test.at(i)=="WA"){
      WA++;
    }
    else if(test.at(i)=="TLE"){
      TLE++;
    }
    else{
      RE++;
    }
  }
  
  cout << "AC" << " " << × << AC << endl;
  cout << "WA" << " " << × << WA << endl;
  cout << "TLE" << " " << × << TLE << endl;
  cout << "RE" << " " << × << RE << endl;
}
