N = int(input())
con = [input() for i in range(N)]
C = [0,0,0,0]
for s in con:
    if(s == "AC"):
        C[0] +=1
    if(s == "WA"):
        C[1] +=1
    if(s == "TLE"):
        C[2] +=1
    if(s == "RE"):
        C[3] +=1
print("AC × ",C[0])
print("WA × ",C[1])
print("TLE × ",C[2])
print("RE × ",C[3])
 