#include <bits/stdc++.h>
#define ll long long
#define scf(n) scanf("%d",&n)
#define lscf(n) scanf("%lld",&n)
#define lpri(n) printf("%lld ",n)
#define pri(n) printf("%d ",(int)n)
#define prin(n) printf("%d\n",(int)n)
#define lprin(n) printf("%lld\n",n)
#define rep(i,ini,n) for(ll i=ini;i<(int)n;i++)
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x)     x.begin(),x.end()
#define tc   int tt; scf(tt); while(tt--)
#define inf INT_MAX
#define ninf INT_MIN
#define gcd __gcd
#define bitcount(n) __builtin_popcount(n)
typedef double dd;
using namespace std;
const ll mod =1e9+7;
const int N = 1e6+7;
 


ll power(ll a, ll b)
{
    if(b==0)
    return 1;
    if(b%2==0)
    return power((a*a)%mod,b/2)%mod;
    else
    return (a*power((a*a)%mod,b/2))%mod;
}

ll fact(ll n)
{
    if(n==0)
    return 1;
    return (n*fact(n-1))%mod;
}

int main{
 int n; string s;
  int count1=0; int count2=0; int count3=0; int count4=0;
  while(n--)
  {
    cin>>s;
    if (s== "AC")
    {
    count1++;}
  }
  
  
   if (s== "WA")
    {
    count1++;}
  }


 if (s== "TLE")
    {
    count1++;}
  }


 if (s== "RE")
    {
    count1++;}
  }

}
cout<<"AC x" " " count1<<endl;

cout<<"WA x"  " " count2<<endl;

cout<<"TLE x" " " count3<<endl;

cout<<"RE x" " " <<count4;

  
}