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

int main() {
	int n;
    cin>>n;
    int c1=0,c2=0,c3=0,c4=0;
   string s;
   for(int i=0;i<n;i++){
        cin>>s;
      if(s=="AC"){
           c1++;
       }
     else if(s=="WA"){
            c2++;
      }
     else if (s=="TLE"){
           c3++;
     }
     else{
      c4++;
    }
 }
  cout<<"AC"<<"×"<<c1<<endl;
 cout<<"WA"<<"×"<<c2<<endl;
 cout<<"TLE"<<"×"<<c3<<endl;
 cout<<"RE"<<"×"<<c4<<endl;
 
	return 0;
}