n = int(input())

l = [0]*4
w = ["AC","WA","TLE","RE"]

for i in range(n):
    s = input()
    if s == "AC":
        l[0] += 1
    elif s == "WA":
        l[1] += 1
    elif s == "TLE":
        l[2] += 1
    else:
        l[3] +=1
        
for i in range(4):
    print(w[i] + " × " + str(l[i]))
    