N = int(input())
AC=0
WA=0
TLE=0
RE=0
for i in range(N):
    tmp=input()
    if tmp=='AC':
        AC+=1
    elif tmp=='WA':
        WA+=1
    elif tmp=='TLE':
        TLE+=1
    elif tmp=='RE':
        RE+=1



ans="AC × "+str(AC)+"\n"+"WA ×"+str(WA)+"\n"+"TLE × "+str(TLE)+"\n"+"RE × "+str(RE)+"\n"
print("{}".format(ans))
