import collections
N = int(input())
S = [input() for i in range(N)]
c = collections.Counter(S)
print("AC　" + "×　" + str(c["AC"]))
print("WA　" + "×　" + str(c["WA"]))
print("TLE　" + "×　" + str(c["TLE"]))
print("RE　" + "×　" + str(c["RE"]))
