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