#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const double PI = 3.141592653589793;
const int MX = 100005;
int main() {
  int N;
  cin >> N;
  vector<string> S(N);
  vector<int> cnt(4);
  for (int i = 0; i < N; i++) {
    cin >> S[i];
    if (S[i] == "AC")
      cnt[0]++;
    else if (S[i] == "WA")
      cnt[1]++;
    else if (S[i] == "TLE")
      cnt[2]++;
    else if (S[i] == "RE")
      cnt[3]++;
  }
  cout << "AC"
       << " × " << cnt[0] << endl;
  cout << "WA"
       << " × " << cnt[1] << endl;
  cout << "TLE"
       << " × " << cnt[2] << endl;
  cout << "RE"
       << " × " << cnt[3] << endl;
  return 0;
}
