N = int(input())
l = []
for i in range(N):
    l.append(input())
AC = l.count('AC')
WA = l.count('WA')
TLE = l.count('TLE')
RE = l.count('RE')
print("AC × {}".format(AC))
print("WA × {}".format(WA))
print("TLE × {}".format(TLE))
print("RE × {}".format(RE))