#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, count1 = 0, count2 = 0, count3 = 0, count4 = 0;
  string result;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> result;
    if (result == "AC") {
      count1++;
    } else if (result == "WA") {
      count2++;
    } else if (result == "TLE") {
      count3++;
    } else if (result == "RE") {
      count4++;
    }
  }
  cout << "AC ×" << count1 << endl;
  cout << "WA ×" << count2 << endl;
  cout << "TLE ×" << count3 << endl;
  cout << "RE ×" << count4 << endl;
  return 0;
}
