#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int i, n, k = 0, z = 0, p = 0, a = 0;
  cin >> n;
  string s;
  for (i = 1; i <= n; i++) {
    cin >> s;
    if (s == "AC") k++;
    if (s == "WA") z++;
    if (s == "TLE") p++;
    if (s == "RE") a++;
  }
  cout << "AC"
       << " "
       << "×"
       << " " << k << endl;
  cout << "WA "
       << " "
       << "×"
       << " " << z << endl;
  cout << "TLE"
       << " "
       << "×"
       << " " << p << endl;
  cout << "RE"
       << " "
       << "×"
       << " " << a << endl;
}
