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