N = int(input())
C =　[0]*4
Moji = ["AC","WA","TLE","RE"]
for i in range(N):
  M = input()
  if M == "AC":
    C[0] += 1
  else M == "WA":
    C[1] += 1
  else M == "TLE":
    C[2] += 1
  else M == "RE":
    C[3] += 1
    
print(Moji[i] + " × " C[i] for i in range(len(Moji)))

