#include <iostream>
#include<cstring>

using namespace std;

int main()
{
    int n,f[1000]={0},a[100];
    string b;
    cin>>t;
    for(int i=0;i<n;i++){
    cin>>b;
    a[i]=b[0];
    f[a[i]]++;
    }
    cout<<"AC x "<<f['A']<<endl;
    cout<<"WA x "<<f['W']<<endl;
    cout<<"TLE x "<<f['T']<<endl;
    cout<<"RE x "<<f['R']<<endl;
}