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