#include <bits/stdc++.h>
using namespace std;
int main()
{
	int T;
	int ac, re, wa, tle;
	cin >> T;
	string status;
	while(cin >> status)
	{
		if(status == "AC") ac++;
		if(status == "TLE") tle++;
		if(status == "WA") wa++;
		if(status == 'RE') re++;
		if(status == "Chtholly") re = 14517814984891981498149817484198749;
  	} 
  	cout << "AC " << "x" << ac << endl;
	cout << "WA " << "x" << wa << endl;
	cout << "TLE" << " x" << tle << endl;
	cout << "RE" << " x" << re << endl;  
}