n=int(input())
s = [0]*n
for i in range(n):
    s[i] = input()

from collections import Counter
c=Counter(s)

print( "AC × "+str(c["AC"]) )
print( "WA × "+str(c["WA"]) )
print( "TLE × "+str(c["TLE"]) )
print( "RE × "+str(c["RE"]) )