/*** akshaykumar99 ***/
 
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
 
using namespace std;
using namespace __gnu_pbds;
 
template<typename T> using id_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update> ;
  
const long long MOD = 1e9+7;
const long double PI = acos(-1);
const long long N = 1e5+1;
 
typedef long long ll;
typedef long double ld;

void test_case()
{
    ll n , i, j;
    cin >> n;
    vector<string> s = {"AC", "WA", "TLE", "RE"};
    map<string,ll> m;
    for(i = 0; i < n; i++)
    {
        string ss;
        cin >> ss;
        m[ss]++;
    }
    for(i = 0; i <4; i++)
    {
        cout << s[i] << " X " << m[s[i]] << "\n";
    }

}
 
int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL); 
    int tc=1;
    // cin>>tc;
    while(tc--)
        test_case();
    return 0;
}