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

typedef long long ll;

template <class T>
void printArray(vector<T> arr) {
	for (T a: arr) cout << a << " ";
	cout << '\n';
}

void printVerdict(bool verdict) {
	cout << (verdict ? "YES": "NO") << '\n';
}

int main() {
	std::ios_base::sync_with_stdio(false);
	cin.tie(0);
	int n;
	cin >> n;
	map<string, int> count;
	
	count["AC"] = 0;
	count["WA"] = 0;
	count["TLE"] = 0;
	count["RE"] = 0;
	
	for (int i = 0; i<n; i++) {
		string temp; cin >> temp;
		count[temp]++;
	}
	cout << "AC x " << count[AC] << '\n';
	cout << "WA x " << count[AC] << '\n';
	cout << "TLE x " << count[AC] << '\n';
	cout << "RE x " << count[AC] << '\n'; 
}

