import collections
N = int(input())
S = []
for _ in range(N):
  S.append(input())

counter = collections.Counter(S)
AC = counter['AC']
WA = counter['WA']
TLE = counter['TLE']
RE = counter['RE']

print("AC × {}".format(AC))
print("WA × {}".format(WA))
print("TLE × {}".format(TLE))
print("RE × {}".format(RE))