#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
const long long INF = 1LL << 60;
template <typename T>
void remove(std::vector<T>& vector, unsigned int index) {
  vector.erase(vector.begin() + index);
}
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long lcm(int a, int b) { return (long long)a * b / gcd(a, b); }
int main() {
  int N;
  cin >> N;
  map<string, int> j;
  for (int i = 0; i < N; i++) {
    string s;
    cin >> s;
    j[s] += 1;
  }
  cout << "AC"
       << "　x　" << j["AC"] << endl;
  cout << "WA"
       << "　x　" << j["WA"] << endl;
  cout << "TLE"
       << "　x　" << j["TLE"] << endl;
  cout << "RE"
       << "　x　" << j["RE"] << endl;
}
