#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pii pair<int, int>
#define pll pair<ll, ll>
#define str string
#define fi first
#define se second
#define pb push_back
#define SET(a, b) memset(a, b, sizeof(a))
#define eps 1e-6
#define pi atan(1) * 4
#define mod 1000000007
#define inf 1000000000
#define llinf 1000000000000000000
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define FORD(i, a, b) for (int i = (a); i >= (b); i--)
#define FORl(i, a, b) for (ll i = (a); i <= (b); i++)
#define FORDl(i, a, b) for (ll i = (a); i >= (b); i--)
using namespace std;
map<string, int> freq;
string vd[4] = ["AC", "WA", "TLE", "RE"];
int main () {
  ios::sync_with_stdio(false); cin.tie(0);
  int t;
  cin >> t;
  FOR(i, 1, t) {
    string S;
    cin >> S;
    freq[S]++;
  }
  FOR(i, 0, 3) {
    printf("%s x %d\n", vd[i].c_str(), freq[vd[i]]);
  }
  return 0;
}