#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define ld long double
#define rep(i,n) for(int i=0;i<(n);i++)
#define repa(i,a,b) for(int i=(a);i<=(b);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define FORR(i,n) for(int i=(n);i>=0;i--)
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define blc boost::lexical_cast<long long>
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
using namespace std;
const int MOD = 1e9+7;
ll add(ll x, ll y) {ll res=x+y; return(res>=MOD?res-MOD:res);}

ll sub(ll x, ll y) {ll res=x-y; return(res<0?res+MOD:res);}

ll mul(ll x, ll y) {ll res=0;x%=MOD; 
while(y){ if(y&1)res=(res+x)%MOD; 
x=(2*x)%MOD;y>>=1;}return res;} 

ll lcm(ll x, ll y) {ll res=(x*y)/__gcd(x,y); return res;}

ll power(ll x, ll y) {ll res=1; x%=MOD; while(y){if(y&1)res=mul(res,x); y>>=1; x=mul(x,x);} return res;}

//////////////////////////////////////////////////////////////////////////////////////

void solve()
{
    ll n;
    unordered_map<string, ll> mapp;
    while(n--)
    {
      string s;
      cin>>s;
      mapp[s]++;
    }
    cout<<"AC x "<<mapp["AC"]<<endl;
  	cout<<"WA x "<<mapp["WA"]<<endl;
  	cout<<"TLE x "<<mapp["TLE"]<<endl;
  	cout<<"RE x "<<mapp["RE"]<<endl;
}
signed main()
{
    fast;
    int t;
    t=1;
    //cin>>t;
    while(t--)
    {
        solve();
    }
    return 0; 
}
