#include <cmath>
#include <deque>
#include <iostream>
#include <string>
#include <utility>

using namespace std;

int main()
{
    int N;
    int cnt[4] = {};
    string txt[] = {"AC",
                    "WA",
                    "TLE",
                    "RE"};
    int i;

    cin >>
        N;

    string S[N];

    for (i = 0; i < N; i++)
    {
        cin >> S[i];
        if (S[i] == txt[0])
            cnt[0]++;
        if (S[i] == txt[1])
            cnt[1]++;
        if (S[i] == txt[2])
            cnt[2]++;
        if (S[i] == txt[3])
            cnt[3]++;
    }
    for (i = 0; i < 4; i++)
    {
        printf("%s × ", txt[i]);
        cout << cnt[i] << endl;
    }

    return 0;
}
