#include <bits/stdc++.h>
using namespace std;
using l1 = long long;
int main() {
  int n;
  cin >> n;
  int ans[4];
  for (int i = 0; i < (4); ++i) ans[i] = 0;
  for (int i = 0; i < (n); ++i) {
    string s;
    cin >> s;
    if (s == "AC") {
      ans[0]++;
    } else if (s == "WA") {
      ans[1]++;
    } else if (s == "TLE") {
      ans[2]++;
    } else {
      ans[3]++;
    }
  }
  cout << "AC × " << ans[0] << endl;
  cout << "WA × " << ans[1] << endl;
  cout << "TLE × " << ans[2] << endl;
  cout << "RE × " << ans[3] << endl;
  return 0;
}
