#include <bits/stdc++.h>
long long int MOD = (long long int)(1e9 + 7);
using namespace std;
long long int add(long long a, long long b) {
  return ((a % MOD) + (b % MOD)) % MOD;
}
long long int mul(long long a, long long b) {
  return ((a % MOD) * (b % MOD)) % MOD;
}
long long int sub(long long a, long long b) {
  long long int ans = ((a % MOD - b % MOD)) % MOD;
  if (ans < 0) ans += MOD;
  return ans;
}
long long int modInverse(long long int a) {
  long long int m = MOD, m0 = m, y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    long long int q = a / m, t = m;
    m = a % m, a = t, t = y;
    y = x - q * y, x = t;
  }
  if (x < 0) x += m0;
  return x;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void MAIN(long long int i, long long int t);
int get() {
  long long int t;
  cin >> t;
  ;
  return t;
}
int log(string name) {
  cout << name << endl;
  return 0;
}
void test(int t) {
  for (long long int i = 0; i < t; i++) {
    MAIN(i, t);
    cout << endl;
  }
}
long long int power(long long int x, long long int y) {
  long long int res = 1;
  x = x % MOD;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % MOD;
    y = y >> 1;
    x = (x * x) % MOD;
  }
  return res;
}
long long int popcount(long long int x) { return __builtin_popcount(x); }
long long int lcm(long long int a, long long int b) {
  return (a * b) / gcd(a, b);
}
long long int n, x;
vector<long long int> v;
void MAIN(long long int current_test_case, long long int total_test_cases) {
  long long int n;
  map<string, int> m;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    m[s]++;
  }
  cout << "AC x " << m["AC"] << endl
       << "WA x " << m["WA"] << endl
       << "TLE x " << m["TLE"] << endl
       << "RE x " << m["RE"] << endl;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  test(1);
  return 0;
}
