#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; char a[n][5]; for(int i=0;i<n;++i) cin>>a[i]; int s=0,b=0,c=0,d=0; for(int i=0 ;i<n;++i) { if(strcmp(a[i],"AC")==0) ++s; else if(strcmp(a[i],"WA")==0) ++b; else if(strcmp(a[i],"TLE")==0) ++c; else if(strcmp(a[i],"RE")==0) ++d; } cout<<"AC x "<<s<<endl; cout<<"WA x "<<b<<endl; cout<<"TLE x "<<c<<endl; cout<<"RE x "<<d<<endl; return 0; } 
