#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7, INF = 1e9;
int main() {
  int n;
  cin >> n;
  vector<string> v(n);
  string s[] = {"AC", "WA", "TLE", "RE"};
  map<string, int> m;
  for (int i = 0; i < n; i++) {
    string t;
    cin >> t;
    m[t]++;
  }
  for (int i = 0; i < 4; i++) {
    cout << s[i] << " × " << m[s[i]] << endl;
  }
  system("pause");
}
