#include<bits/stdc++.h>
#define Vsort(a) sort(a.bigin(), a.end())
#define rep(i,n) for(int i = 0; i < (n); i++)

using namespace std;
using ll = long long;

int main(){
  int n, ac = 0, wa = 0, tle = 0, re = 0;
  cin >> n;
  vector<string> s(n);
  rep(i,n){
    cin >> s(i);
    switch(s[i]){
      case "AC":
        ac++;
        break;
      case "WA":
        wa++;
        break;
      case "TLE":
        tle++;
        break;
      case "RE"
        re++;
        break;
    }
  }
  cout << "AC × " + ac << endl;
  cout << "WA × " + wa << endl;
  cout << "TLE × " + tle << endl;
  cout << "RE × " + re << endl;
  return 0;
}