#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  string S;
  int a = 0;
  int w = 0;
  int t = 0;
  int r = 0;
  for (int i = 0; i < n; i++) {
    cin >> S;
    if (S[0] == 'A')
      a++;
    else if (S[0] == 'W')
      w++;
    else if (S[0] == 'T')
      t++;
    else if (S[0] == 'R')
      r++;
  }
  cout << "AC × " << a << endl;
  cout << "WA × " << w << endl;
  cout << "TLE × " << t << endl;
  cout << "RE × " << r << endl;
  return 0;
}
