#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;#include<bits/stdc++.h>
using namespace std;
#define in cin>>
#define out cout<<
#define change endl

int main(void)
{
   int n;cin>>n;
vector<char> v;
    map<char,int> m;
for(int i=0;i<n;i++)
{ 
string s;cin>>s;v.push_back(s[0]);
}
for(int i=0;i<n;i++)
{
m[v[i]]++;
}
    cout<<"AC × "<<m['A']<<endl;
    cout<<"WA × "<<m['W']<<endl;
    cout<<"TLE × "<<m['T']<<endl;
    cout<<"RE × "<<m['R']<<endl;
}
    while(n--)
    {
    string s;in s;
    if(s[0]=='A') a++;else 
if(s[0]=='T') t++;else 
      if(s[0]=='W') w++;else 
      if(s[0]=='R') r++;
}
    out "AC × "<<a;change;
    out "WA × "<<w;change;
    out "TLE × "<<t;change;
    out "RE × "<<r;

}