//  Author : Amit Kumar 

#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;

int main(void){
#ifdef HELL_JUDGE
    auto INITIAL_TIME = high_resolution_clock::now();
#endif 
    map<string , int>f; 
    f["AC"] = 0; 
    f["WA"] = 0;
    f["RE"] = 0;
    f["TLE"] = 0;
    while(n--){
        string s; cin >> s; 
        f[s]++;
    }
    printf("AC x %d\n",f["AC"]);
    printf("WA x %d\n",f["WA"]);
    printf("TLE x %d\n",f["TLE"]);
    printf("RE x %d\n",f["RE"]);

#ifdef HELL_JUDGE
    auto FINAL_TIME = high_resolution_clock::now();
    cout << "Time : "
         << duration_cast<milliseconds>(FINAL_TIME-INITIAL_TIME).count() 
         << " ms" << '\n'; 
#endif 
    return 0;
}
