N = int(input())
S = []
for _ in range(N): 
    S.append(input())
AC = S.count('AC')
WA = S.count('WA')
TLE = S.count('TLE')
RE = S.count('RE')
print('AC ×', AC)
print('WA ×', WA)
print('TLE ×', TLE)
print('RE ×', RE)