#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t, a = 0, b = 0, c = 0, d = 0;
  while (t--) {
    string s;
    cin >> s;
    if (s[0] == 'A')
      a++;
    else if (s[0] == 'W')
      b++;
    else if (s[0] == 'T')
      c++;
    else if (s[0] == 'R')
      d++;
  }
  cout << "AC x " << a << endl;
  cout << "WA x " << b << endl;
  cout << "TLE x " << c << endl;
  cout << "RE x " << d << endl;
  return 0;
}
