#include <iostream>
#include<string>
using namespace std;

int main()
{
int num, accounter=0,wacounter=0,tlecounter=0,recounter=0;
cin>>num;
string arr[100];
for(int i=0; i<num; i++){
    cin>>arr[i];
    if(arr[i]=="AC")
        accounter++;
   else if(arr[i]=="WA")
        wacounter++;
    else if (arr[i]=="TLE")
        tlecounter++;
    else
        recounter++;
}
cout<<"AC"<<" "<<"x"<<accounter<<endl;
cout<<"WA"<<" "<<"x"<<wacounter<<endl;
cout<<"TLE"<<" "<<"x"<<tlecounter<<endl;
cout<<"RE"<<" "<<"x"<<recounter<<endl;

    return 0;
}
#include <iostream>
#include<string>
using namespace std;

int main()
{
int num, accounter=0,wacounter=0,tlecounter=0,recounter=0;
cin>>num;
string arr[100];
for(int i=0; i<num; i++){
    cin>>arr[i];
    if(arr[i]=="AC")
        accounter++;
   else if(arr[i]=="WA")
        wacounter++;
    else if (arr[i]=="TLE")
        tlecounter++;
    else
        recounter++;
}
cout<<"AC"<<" "<<"x "<<accounter<<endl;
cout<<"WA"<<" "<<"x "<<wacounter<<endl;
cout<<"TLE"<<" "<<"x "<<tlecounter<<endl;
cout<<"RE"<<" "<<"x "<<recounter<<endl;

    return 0;
}
