#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  int a=0,b=0,c=0,d=0;
  cin>>n;
  vector<string> vec(n);
  for(int i=0;i<n;i++){
    cin>>vec.at(i);
      if(vec.at(i)=="AC"){
        a+=1;}
    else if (vec.at(i)=="WA"){
      b+=1;}
    else if (vec.at(i)=="TLE"){
      c+=1;}
    else {d+=1;}
  }
  cout<<"AC"+'×'+a<<endl;
  cout<<"WA"+'×'+b<<endl;
  cout<<"TLE"+'×'+c<<endl;    
  cout<<"RE"+'×'+d<<endl;
}