#include <bits/stdc++.h>
using namespace std;
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int N;
  int a = 0, w = 0, t = 0, r = 0;
  cin >> N;
  string S[N];
  for (int i = 0; i < (N); ++i) {
    cin >> S[i];
    if (S[i] == "AC") {
      a++;
    } else if (S[i] == "WA") {
      w++;
    } else if (S[i] == "TLE") {
      t++;
    } else {
      r++;
    }
  }
  cout << "AC × " << a << "\n";
  cout << "WA × " << w << "\n";
  cout << "TLE × " << t << "\n";
  cout << "RE × " << r << "\n";
  return 0;
}
