#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c[4] = {0};
  string judge[4] = {"AC", "WA", "TLE", "RE"};
  cin >> n;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    for (int j = 0; j < 4; j++) {
      if (judge[j] == s) {
        c[j]++;
        break;
      }
    }
  }
  for (int i = 0; i < 4; i++) cout << judge[i] << " × " << c[i] << endl;
  return 0;
}
