N = int(input()) 
s = [input() for i in range(N)]
count = [0]*4
for a in s[1:]:
    if a == "AC":
        count[0] += 1
    if a == "WA":
        count[1] += 1
    if a == "TLE":
        count[2] += 1
    if a == "RE":
        count[3] += 1
print("AC","×",count[0],"\n","WA","×",count[1],"\n","TLE","×",count[2],"\n","RE","×",count[3],"\n")
  
  
