#define _USE_MATH_DEFINES
#include<bits/stdc++.h>
#include<cmath>
using namespace std;
#define ll long long int
#define mod 1000000007
#define adjSize 100000
#define MAX 1000000000
#ifdef FASTIO
#endif
/*
	Coded by Archit Shinde
*/
bool prime[(ll)1e7+1]; 
 
bool sortbysec(const pair<int,int> &a, 
              const pair<int,int> &b) 
{ 
    return (a.second < b.second); 
}
 
unordered_set<ll> primeFactors(int n)  
{  
    // Print the number of 2s that divide n  
    unordered_set<ll> result;
    if(n%2==0){
    	result.insert(2);
    	while(n%2==0){
    		n=n/2;
    	} 
    }
  
    // n must be odd at this point. So we can skip  
    // one element (Note i = i +2)  
    for (int i = 3; i <= sqrt(n); i = i + 2)  
    {  
        // While i divides n, print i and divide n  
        if(n%i==0){
        	result.insert(i);
        	while(n%i==0){
        		n=n/i;
        	}
        }
    }  
  
    // This condition is to handle the case when n  
    // is a prime number greater than 2  
    if (n > 2)  
    	result.insert(n);
    return result;
}  

vector<ll> printDivisors(int n) 
{ 
    // Note that this loop runs till square root 
    vector<ll> div;
    for (int i=1; i<=sqrt(n); i++) 
    { 
        if (n%i == 0) 
        { 
            // If divisors are equal, print only one 
            if (n/i == i && i%2 != 0 && i != 1){
                div.push_back(i);
            }
  
            else // Otherwise print both 
            {
            	if(i%2!=0)
                	div.push_back(i);
                if((n/i) %2!=0)	
                	div.push_back(n/i);

            }
        } 
    }
    //sort(div.begin(), div.end());
    return div;
} 

unordered_set<ll> SieveOfEratosthenes(ll n) 
{ 
	unordered_set<ll> u;
    memset(prime, true, sizeof(prime)); 
  
    for (ll p=2; p*p<=n; p++) 
    { 
        if (prime[p] == true) 
        {  
            for (ll i=p*p; i<=n; i += p) 
                prime[i] = false; 
        } 
    } 
  
    for (ll p=2; p<=n; p++) 
       if (prime[p]) 
          u.insert(p);
    return u;
}

ll gcd(ll a, ll b) 
{ 
    if (b == 0) 
        return a; 
    return gcd(b, a % b);  
      
}

ll product(ll num, ll result[], ll size){
	ll m = 0;
	ll i = 0;
	ll ans;
	for(i = 0; i<size; i++){
		ans = num*result[i]+m;
		m = ans/10;
		result[i] = ans%10;
	}
	while(m!=0){
		result[size] = m%10;
		m /= 10;
		size++;
	}
	return size;
}
void factorial(ll n){
	ll result[159];
	result[0] = 1;
	ll i, size = 1;
	for(i = 2; i<=n; i++){
		size = product(i, result, size);
	}
	for(i = size-1; i>=0; i--){
		cout<<result[i];
	}
}


int main()
{
	ios::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
	ll t;
	cin>>t;
	while(t--){
		string str;
		cin>>str;
		map<string, ll> cnt;
	}
	cout<<"AC x "<<cnt["AC"]<<endl;
	cout<<"WA x "<<cnt["WA"]<<endl;
	cout<<"TLE x "<<cnt["TLE"]<<endl;
	cout<<"RE x "<<cnt["RE"]<<endl;
	return 0;
}

