#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(0);
  int n, RE = 0, AC = 0, TLE = 0, WA = 0;
  string s;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s;
    if (s == "RE")
      RE++;
    else if (s == "AC")
      AC++;
    else if (s == "TLE")
      TLE++;
    else if (s == "WA")
      WA++;
  }
  cout << "AC × " << AC << endl;
  cout << "WA × " << WA << endl;
  cout << "TLE × " << TLE << endl;
  cout << "RE × " << RE << endl;
  return 0;
}
