#include <bits/stdc++.h>
using namespace std;
const long long md = 1000000007;
inline void Fio() {
  freopen("1.in", "r", stdin);
  freopen("1.out", "w", stdout);
}
map<string, int> mp;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  string str;
  for (int i = 0; i < n; i++) {
    cin >> str;
    if (!mp.count(str)) mp[str] = 0;
    mp[str]++;
  }
  cout << "AC x " << mp["AC"] << endl;
  cout << "WA x " << mp["WA"] << endl;
  cout << "TLE x " << mp["TLE"] << endl;
  cout << "RE x " << mp["RE"] << endl;
  return 0;
}
