#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)((1e5) + 100);
int max(int a, int b) {
  if (a > b)
    return a;
  else
    return b;
}
int min(int a, int b) {
  if (a < b)
    return a;
  else
    return b;
}
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int cbrt(int x) {
  int lo = 1, hi = min(2000000ll, x);
  while (hi - lo > 1) {
    int mid = (lo + hi) / 2;
    if (mid * mid * mid < x) {
      lo = mid;
    } else
      hi = mid;
  }
  if (hi * hi * hi <= x)
    return hi;
  else
    return lo;
}
const int dx[4] = {-1, 1, 0, 0};
const int dy[4] = {0, 0, -1, 1};
const int N = (int)(1e6 + 5);
signed main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n;
  unordered_map<string, int> cnt;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    cnt[s]++;
  }
  cout << "AC x " << cnt["AC"] << endl;
  cout << "WA x " << cnt["WA"] << endl;
  cout << "TLE x " << cnt["TLE"] << endl;
  cout << "RE x " << cnt["RE"] << endl;
  return 0;
}
