N = int(input())

i = 1
AC = 0
WA = 0
TLE = 0
RE = 0
while i < N+1:
    a = str(input())
    if a == "AC":
        AC = AC + 1
    elif a == "WA":
        WA = WA + 1
    elif a == "TLE":
        TLE = TLE + 1
    elif a == "RE":
        RE = RE + 1
    i = i + 1

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