#include<iostream>
using namespace std;
int main(){
  int N;
  cin>> N;
  string S[N];
  int ac=0;
  int wa=0;
  int tle=0;
  int re=0;
  for(int i=0;i<N;i++){
  	if(S[i]=="AC"){
      int ac +=1;
    }
    else if(S[i]=="WA"){
      int wa +=1;
    }
    else if(S[i]=="TLE"){
      int tle +=1;
    }
    else if(S[i]=="RE"){
      int re +=1;
    }
  }
  cout<< "AC x "<< ac << endl;
  cout<< "WA x "<< wa << endl;
  cout<< "TLE x "<< tle << endl;
  cout<< "RE x "<< re << endl;
}



    