/**
 *   Author:  Wasi Ur Rahman
 *   FROM RMSTU
**/
#include <bits/stdc++.h>
#define ll                     long long
#define boost                  ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ticktock               cout<<"\nTime Elapsed: " << 1.0*clock() / CLOCKS_PER_SEC << " sec\n"
#define min3(a,b,c)            min(a,min(b,c))
#define min4(a,b,c,d)          min(d,min3(a,b,c))
#define max3(a,b,c)            max(a,max(b,c))
#define max4(a,b,c,d)          max(d,max3(a,b,c))
#define all(v)                 v.begin(),v.end()
#define revall(v)              v.rbegin(),v.rend()
#define pb                  	push_back
#define eb                     emplace_back
#define setbits(x)             __builtin_popcountll(x)
#define zrobits(x)             __builtin_ctzll(x)
#define si(x)               	scanf("%d", &x)
#define sii(x, y)           	scanf("%d %d", &x, &y)
#define siii(x, y, z)       	scanf("%d %d %d", &x, &y, &z)
#define siiii(p,x, y, z)    	scanf("%d %d %d %d",&p, &x, &y, &z)
#define sll(x, y)           	scanf("%lld %lld", &x, &y)
#define slll(x, y, z)       	scanf("%lld %lld %lld", &x, &y, &z)
#define read                	freopen("input.txt","r",stdin)
#define write               	freopen("output.txt","w",stdout)
#define println()          		cout << endl
#define printi(x)           	printf("%d\n")
#define printii(x,y)        	printf("%d %d\n")
#define printiii(x,y,z)     	printf("%d %d %d\n")
#define printl(x)           	printf("%lld\n")
#define printll(x,y)        	printf("%lld %lld\n")
#define printlll(x,y,z)     	printf("%lld %lld %lld\n")
using namespace std;
/*************************************
*          A S S E M B L E         *
**************************************/
bool Prime(ll n){if(n <= 1)return false;for (ll i = 2; i<=sqrt(n); i++)if (n % i == 0)return false;return true;}
ll fact(ll n){ll res = 1;for(ll i = n;i>=1;i--)res *= i;return res;}
ll nCr(ll n,ll r){return (fact(n)/(fact(r)*fact(n-r)));}
ll nPr(ll n,ll r){return fact(n)/fact(n-r);}
ll modpow(ll a, ll n, ll mod){ll res=1;while(n>0){if(n&1) res=res*a%mod;a=a*a%mod;n>>=1;}return res;}
const int mod= 1e9+7;
inline int add(int a,int b){if((a+=b)>=mod)a-=mod;return a;}
inline int dec(int a,int b){if((a-=b)<0)a+=mod;return a;}
inline int mult(int a,int b){long long t=1ll*a*b;if(t>=mod)t%=mod;return t;}
inline int power(int a,int b){int out=1;while(b){if(b&1)out=mult(out,a);a=mult(a,a);b>>=1;}return out;}
/*************************************
*  E N D    G A M E   S T A R T S  *
**************************************/
int main(){
    boost;
    int n;
    cin >> n;
    map<string,int> mp;
    map<string,int>::iterator it;
    while(n--){
        string str;
        cin >> str;
        mp[str]++;
    }int a=0,b=0,c=0,d=0;
    for(it = mp.begin();it != mp.end();++it)
    {
        if(it->first == "AC"){
            a = it->second;
        }else if(it->first == "WA"){
            b = it->second;
        }else if(it->first == "TLE"){
            c = it->second;
        }else if(it->first == "RE"){
            d = it->second;
        }
    }
    cout << "AC x " << a << endl;
    cout << "WA x " << b << endl;
    cout << "TLE x " << c << endl;
    cout << "RE x " << d << endl;
}


Measured memory_bytes: 3684