import sys

import math
import itertools
import random
n = int(input())
li = [0] * 4  #ac,wa,tle,re
for i in range(n):
    tmp = input()
    if (tmp == "AC"):
        li[0] += 1
    elif (tmp == "WA"):
        li[1] += 1
    elif (tmp == "TLE"):
        li[2] += 1
    else:
        li[3] += 1
print("AC × " + str(li[0]))
print("WA × " + str(li[1]))
print("TLE × " + str(li[2]))
print("RE × "+str(li[3]))
