N = int(input())

list = [input() for i in range(N)]

AC = int(0)
TLE = int(0)
WA = int(0)
RE = int(0)

for i in range(N):
    if list[i] == "AC":
        AC = AC + 1
    elif list[i] == "TLE":
        TLE = TLE + 1
    elif list[i] == "WA":
        WA = WA + 1
    else:
        RE = RE + 1

print("AC × " + str(AC))
print("WA × " + str(WA))
print("TLE × " + str(TLE))
print("RE × " + str(RE))