N = int(input())

list = [0] * N

for i in range(N):

    ans = input()

    list[N] = ans

ac = list.count('AC')
wa = list.count('WA')
tle = list.count('TLE')
re = list.count('RE')

print("AC × "ac)
print("WA × "wa)
print("TLE × "tle)
print("RE × "re)