N = int(input())
S = []
for _ in range(N):
    S.append(input())

AC = []
WA = []
TLE = []
RE = []

for i in range(N):
    if S[i] == "AC":
        AC.append(i)
    elif S[i] == "WA":
        WA.append(i)
    elif S[i] == "TLE":
        TLE.append(i)
    else:
        RE.append(i)
print("AC",  "×",  len(AC))
print("WA",  "×",  len(WA))
print("TLE",  "×",  len(TLE))
print("RE",  "×",  len(RE))