#include <bits/stdc++.h>

using namespace std;
int main(){
  int x;
  cin>>x;
  int a=0,w=0,t=0,r=0;
  for(int i=;i<x;i++){
    string n;
    cin>>n;
    if(n=="AC")a++;
    if(n=="WA")w++;
    else if(n=="TLE")t++;
    else r++;
  }
  cout<<"AC x "<<a<<endl;
  cout<<"WA × "<<w<<endl;
  cout<<"TLE × "<<t<<endl;
  cout<<"RE × "<<w<<endl;
}
