#include<bits/stdc++.h>
using namespace std;
#define in cin>>
#define out cout<<
#define change endl

int main()
{
   int n,a=0,t=0,w=0,r=0;
    in n;
    while(n--)
    {
    string s;in s;
    if(s[0]=='A') a++;
if(s[0]=='T') t++;if(s[0]=='W') w++;if(s[0]=='R') r++;
}
    out "AC × "<<a;change;
    out "WA × "<<w;change;
    out "TLE × "<<t;change;
    out "RE × "<<r;

}