#include <bits/stdc++.h>
using namespace std;
const long long LINF = 1e18;
const int INF = 1e9;
template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T& a, const T& b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
using Graph = vector<vector<long long>>;
const long long MOD = 1000000007;
const double PI = 3.1415926535897932;
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  string s;
  map<string, int> m;
  for (long long i = 0; i < (n); i++) {
    cin >> s;
    m[s]++;
  }
  cout << "AC × " << m["AC"] << endl;
  cout << "WA × " << m["WA"] << endl;
  cout << "TLE × " << m["TLE"] << endl;
  cout << "RE × " << m["RE"] << endl;
  return 0;
}
