# B - Judge Status Summary


def main(n, s):
    result_table = {
        'AC': 0,
        'WA': 0,
        'TLE': 0,
        'RE': 0
    }
    for i in s:
        result_table[i] += 1
    return result_table


if __name__ == "__main__":
    n = int(input())
    s = []
    for i in range(n):
        s.append(input())
    results = main(n, s)
    for key, value in results.items():
        print(f"{key} × {value}")
