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