n = int(input())
s = [0] * n
for i in range(n):
    s[i] = input()
print('AC × ' + str(s.count('AC')))
print('WA × ' + str(s.count('WA')))
print('TLE × ' + str(s.count('TLE')))
print('RE × ' + str(s.count('RE')))