from collections import Counter
N = int(input())
S = []
for i in range(N):
  S.append(input())
s = Counter(S)

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