#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  vector<string> s(10);
  int ac, wa, tle, re = 0;
  for (int i = 0; i < N; i++) {
    cin >> s.at(i);
    if (s.at(i) == "AC") {
      ++ac;
    } else if (s.at(i) == "WA") {
      ++wa;
    } else if (s.at(i) == "TLE") {
      ++tle;
    } else if (s.at(i) == "RE") {
      ++re;
    }
  }
  cout << "AC"
       << " "
       << "×" << ac << endl;
  cout << "WA"
       << " "
       << "×" << wa << endl;
  cout << "TLE"
       << " "
       << "×" << tle << endl;
  cout << "RE"
       << " "
       << "×" << re << endl;
}
