n = int(input())

s = []
for i in range(n):
    s.append(input())

out = {"AC":0,"WA":0,"TLE":0,"RE":0}

for i in range(n):
    out[s[i]] += 1
for i in ["AC","WA","TLE","RE"]:
    print(f"{i} × {out[i]}") 
