#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<string> s(n);
  for (int i = 0; i < n; i++) cin >> s[i];
  int ACcnt = 0, WAcnt = 0, TLEcnt = 0, REcnt = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == "AC") ACcnt++;
    if (s[i] == "WA") WAcnt++;
    if (s[i] == "TLE") TLEcnt++;
    if (s[i] == "RE") REcnt++;
  }
  cout << "AC  ×  " << ACcnt << endl;
  cout << "WA  ×  " << WAcnt << endl;
  cout << "TLE  ×  " << TLEcnt << endl;
  cout << "RE  ×  " << REcnt << endl;
  return 0;
}
