N = int(input())
AC =[]
WA =[]
TLE =[]
RE =[]

for i in range(N):
    s = str(input())
    if s == "AC":
        AC.append(s)
    elif s == "WA":
        WA.append(s)
    elif s == "TLE":
        TLE.append(s)
    elif s =="RE":
        RE.append(s)
print("AC × "+str(len(AC)))
print("WA × "+str(len(WA)))
print("TLE × "+str(len(TLE)))
print("RE × "+str(len(RE)))