#include<iostream>
#include<stdio.h>
using namespace std;
using ll=long long;
#include<algorithm>
#include<set>
#include<vector>
#define rep(i,n) for(int i=0;i<(n);i++)
using P=pair<int,int>;
const int mod=1000000007;


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