n = int(input())
AC, WA, TLE, RE = 0,0,0,0

for i in range(n):
    s = input()
    if s == "AC":
        AC += 1
    elif s == "WA":
        WA += 1
    elif s == "TLE":
        TLE += 1
    else:
        RE += 1

print("AC × {}\nWA × {}\nTLE × {}\nRE × {}".format(AC,WA,TLE,RE))