N = int(input())
S = []
for i in range(N):
    S.append(input())
AC = S.count("AC")
WA = S.count("WA")
TLE = S.count("TLE")
RE = S.count("RE")
print("AC × " + str(AC))
print("WA × " + str(WA))
print("TLE × " + str(TLE))
print("RE × " + str(RE))