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