#include <iostream>
using namespace std;

int main(){
    int n;
    int ac=0,wa=0,tle=0,re=0;
    cin>>n;

    char s[n];

    for(int i=0; i<n; i++){
        cin>>s[i];
    }

    for(int i=0; i<n; i++){
        if(s[i]=="AC") ac++;
        if(s[i]=="WA") wa++;
        if(s[i]=="TLE") tle++;
        if(s[i]=="RE") re++;
    }

    cout<<"AC × "<<ac<<endl;
    cout<<"WA × "<<wa<<endl;
    cout<<"TLE × "<<tle<<endl;
    cout<<"RE × "<<re<<endl;


}