TestCase = int(input())

str_list = []
str_list = [input() for _ in range(TestCase)]

print("{} {}".format("AC ×",str_list.count('AC')))
print("{} {}".format("WA ×",str_list.count('WA')))
print("{} {}".format("TLE ×",str_list.count('TLE')))
print("{} {}".format("RE ×",str_list.count('RE')))