#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
int main() {
  int N;
  cin >> N;
  map<string, int> mp;
  int A = 0;
  int W = 0;
  int T = 0;
  int R = 0;
  for (int i = 0; i < N; i++) {
    string s;
    cin >> s;
    if (s[0] == 'A') A++;
    if (s[0] == 'W') W++;
    if (s[0] == 'T') T++;
    if (s[0] == 'R') R++;
  }
  cout << "AC "
       << "✕ " << A << endl;
  cout << "WA "
       << "✕ " << W << endl;
  cout << "TLE "
       << "✕ " << T << endl;
  cout << "RE "
       << "✕ " << R << endl;
}
