#include <bits/stdc++.h>
using namespace std;
int a, w, t, r;
int main() {
  int n;
  char s[100];
  while (n--) {
    gets(s);
    if (s[0] == 'A') a++;
    if (s[0] == 'W') w++;
    if (s[0] == 'T') t++;
    if (s[0] == 'R') r++;
  }
  cout << "AC x " << a << endl;
  cout << "WA x " << w << endl;
  cout << "TLE x " << t << endl;
  cout << "RE x " << r << endl;
}
