N = int(input())
C0 = 0
C1 = 0
C2 = 0
C3 = 0
for i in range(N):
    if input() == "AC":
        C0 += 1
    elif input() == "WA":
        C1 += 1
    elif input() == "TLE":
        C2 += 1
    elif input() == "RE":
        C3 += 1
print("AC × %d",C0)
print("WA × %d",C1)
print("TLE × %d",C2)
print("RE × %d",C3)