#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int mod = 1000000007;
int main() {
  int n;
  string a;
  int c0 = 0, c1 = 0, c2 = 0, c3 = 0;
  cin >> n;
  for (int i = 0; i < (n); i++) {
    cin >> a;
    if (a == "AC") c0++;
    if (a == "WA") c1++;
    if (a == "TLE") c2++;
    if (a == "RE") c3++;
  }
  cout << "AC ×" << c0 << endl;
  cout << "WA ×" << c1 << endl;
  cout << "TLE ×" << c2 << endl;
  cout << "RE ×" << c3 << endl;
  return 0;
}
