#include <bits/stdc++.h>
#define rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = (int)(a) ; i < (int)(b) ; i++)


#define SZ(x) ((int)(x).size())


typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int uint;
struct Vector{
    double x, y;
};

template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
using namespace std;



int main()
{
    int N, i;
    string S;
    cin >> N;
    vector<int> result = {0, 0, 0, 0};
    vector<string> judge = {"AC", "WA", "TLE", "RE"};
    rep(i, N) {
        cin >> S;
        if ("AC" == S)
            result[0] += 1;
        if ("WA" == S)
            result[1] += 1;
        if ("TLE" == S)
            result[2] += 1;
        if ("RE" == S)
            result[3] += 1;
    }
    rep(i, 4)
        printf("%s × %d\n", judge[i], result[i]);
    

    return 0;
}

