n = int(input())
s = [input() for i in range(n)]
AC,WA,TLE,RE = 0,0,0,0

for i in s:
    if i == "AC":
        AC += 1
    elif i == "WA":
        WA += 1
    elif i == "TLE":
        TLE += 1
    else:
        RE += 1
print("AC × " + str(AC))
print("WA × " + str(WA))
print("TLE × " + str(TLE))
print("RE × " + str(RE))