#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void init() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(20);
}
int main() {
  init();
  int n;
  cin >> n;
  string s;
  int ac = 0, wa = 0, tle = 0, re = 0;
  for (ll i = 0; i < (ll)(n); i++) {
    cin >> s;
    if (s == "AC") ac++;
    if (s == "WA") wa++;
    if (s == "TLE") tle++;
    if (s == "RE") re++;
  }
  cout << "AC"
       << "×" << ac << endl;
  cout << "WA"
       << "×" << wa << endl;
  cout << "TLE"
       << "×" << tle << endl;
  cout << "RE"
       << "×" << re << endl;
}
