import collections
n = int(input())
s = [input() for _ in range(n)]
s = collections.Counter(s)
print("AC x " + str(s["AC"]))
print("WA x " + str(s["WA"]))
print("ATLE x " + str(s["TLE"]))
print("RE x " + str(s["RE"]))
