#include <bits/stdc++.h>
using namespace std;
double pi = 3.141592653589793;
long long mod = 1000000007;
long long INF = 1000000001;
int intmax = 2147483647;
int intmin = -2147483648;
long long llmax = 9223372036854775807;
long long llmin = -9223372036854775807;
int main() {
  int n;
  cin >> n;
  vector<string> s(n);
  for (int i; i < n; i++) cin >> s[i];
  int ac_cnt, wa_cnt, tle_cnt, re_cnt = 0;
  for (int i; i < n; i++) {
    if (s[i] == "AC") ac_cnt++;
    if (s[i] == "WA") wa_cnt++;
    if (s[i] == "TLE") tle_cnt++;
    if (s[i] == "RE") re_cnt++;
  }
  cout << "AC × " << ac_cnt << endl;
  cout << "WA × " << wa_cnt << endl;
  cout << "TLE × " << tle_cnt << endl;
  cout << "RE × " << re_cnt << endl;
  return 0;
}
