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