#include <stdio.h>
#include <stdlib.h>

#include <iostream>
#include <iomanip>
#include <sstream>
#include <fstream>
#include <stdint.h>
#include <string.h>

#define _USE_MATH_DEFINES
#include <math.h>

#include <vector>
#include <list>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <deque>
#include <string>

#include <algorithm>
#include <functional>
#include <bitset>
#include <functional>
#include <chrono>
#include <random>

#define sqr(x) (x) * (x)

typedef unsigned int u32;
typedef int i32;
typedef unsigned long long int u64;
typedef long long int i64;
typedef uint16_t u16;
typedef int16_t i16;
typedef uint8_t u8;
typedef int8_t i8;

using namespace std;
using namespace std::chrono;

const i64 mod = 1'000'000'000ll + 7;
//const i64 smod = 998244353ll;
//const i64 inf = 1'000'000'000'000'000'000ll + 7;
const i64 inf = 1'000'000'007;

const long double eps = 1e-8;

const i64 MAXN = 5'000 + 5;

i64 T;

i64 n, k;
i64 a[MAXN];

vector<i64> pos;
vector<i64> neg;
i64 zero = 0;

i64 calc_pos() {
    i64 R = 1;

    sort(pos.begin(), pos.end());
    sort(neg.begin(), neg.end());

    i64 i = pos.size() - 1;
    i64 j = 0;

    if (k % 2) {
        k -= 1;
        R *= pos[i];
        R %= mod;
        i--;
    }

    while (k > 0 && i > 0 && j < (i64)neg.size() - 1) {
        i64 pn = neg[j] * neg[j + 1];
        i64 pp = pos[i] * pos[i - 1];
        if (pn > pp) {
            R *= pn % mod;
            j += 2;
        }
        else {
            R *= pp % mod;
            i -= 2;
        }
        k -= 2;
        R %= mod;
    }

    while (k > 0 && i > 0) {
        i64 pp = pos[i] * pos[i - 1];
        R *= pp % mod;
        R %= mod;
        k -= 2;
        i -= 2;
    }

    while (k > 0 && j < (i64)neg.size() - 1) {
        i64 pn = neg[j] * neg[j + 1];
        R *= pn % mod;
        R %= mod;
        k -= 2;
        j += 2;
    }

    return R;
}

i64 calc_neg() {
    i64 R = 1;

    sort(pos.begin(), pos.end());
    sort(neg.begin(), neg.end());

    i64 i = 0;
    i64 j = neg.size() - 1;

    k -= 1;
    j -= 1;
    /*
    R *= neg.back();
    R %= mod;
    */

    while (k > 0 && i < (i64)pos.size() - 1 && j > 0) {
        i64 pn = neg[j] * neg[j - 1];
        i64 pp = pos[i] * pos[i + 1];
        if (pn > pp) {
            R *= pn % mod;
            j -= 2;
        }
        else {
            R *= pp % mod;
            i += 2;
        }
        k -= 2;
        R %= mod;
    }

    while (k > 0 && i < (i64)pos.size() - 1) {
        i64 pp = pos[i] * pos[i + 1];
        R *= pp % mod;
        R %= mod;
        k -= 2;
        i += 2;
    }

    while (k > 0 && j > 0) {
        i64 pn = neg[j] * neg[j - 1];
        R *= pn % mod;
        R %= mod;
        k -= 2;
        j -= 2;
    }

    R *= (mod + neg.back()) % mod;
    R %= mod;

    return R;
}


int main(int argc, char* argv[]) {
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cout.precision(15); cout.setf(ios::fixed); cerr.precision(15); cerr.setf(ios::fixed);

    i64 n;
    cin >> n;

    map<string, i64> q;
    for (i64 i = 0; i < n; i++) {
        string s;
        cin >> s;
        q[s] += 1;
    }

    vector<string> b = {"AC", "WA", "TLE", "RE"};
    for (auto e : b) {
        cout << e << " x " << q[e] << endl;
    }

    return 0;
}

Measured memory_bytes: 3668