N = int(input())
list = [input() for i in range(N)]
print('AC x '+ strl(ist.count('AC')))
print('WA x '+ str(list.count('WA')))
print('TLE x '+ str(list.count('TLE')))
print('RE x '+ str(list.count('RE')))