#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
ll mod = 1000000007;
ll mod2 = 998244353;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  map<string, int> a;
  a["AC"] = 0;
  a["WA"] = 0;
  a["TLE"] = 0;
  a["RE"] = 0;
  for (int i = (int)(0); i < (int)(n); i++) {
    string x;
    cin >> x;
    a[x]++;
  }
  cout << "AC × " << a["AC"] << endl;
  cout << "WA × " << a["WA"] << endl;
  cout << "TLE × " << a["TLE"] << endl;
  cout << "RE × " << a["RE"] << endl;
}
