n = int(input())
s = [input() for i in range(n)]

nac = 0
nwa = 0
ntle = 0
nre = 0

print(s)
for i in s:
    if i == 'AC':
        nac += 1
    if i == 'WA':
        nwa += 1
    if i == 'TLE':
        ntle += 1
    if i == 'RE':
        nre += 1

print("AC × ", nac)
print("WA × ", nwa)
print("TLE × ", ntle)
print("RE × ", nre)



