#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N;
  long long cnt1 = 0, cnt2 = 0, cnt3 = 0, cnt4 = 0;
  string input;
  cin >> N;
  for (long long i = 0; i < N; i++) {
    cin >> input;
    if (input == "AC") {
      cnt1++;
    } else if (input == "WA") {
      cnt2++;
    } else if (input == "TLE") {
      cnt3++;
    } else if (input == "RE") {
      cnt4++;
    }
  }
  cout << "AC × " << cnt1 << endl;
  cout << "WA × " << cnt2 << endl;
  cout << "TLE × " << cnt3 << endl;
  cout << "RE × " << cnt4 << endl;
}
