N=int(input())
S=[input() for i in range(N)]
ac_count=0
wa_count=0
tle_count=0
re_count=0
for i in range(len(S)):
    if S[i]=="AC":
        ac_count+=1
    if S[i]=="WA":
        wa_count+=1
    if S[i]=="TLE":
        tle_count+=1
    if S[i]=="RE":
        re_count+=1
print("AC ×",ac_count)
print("WA ×",wa_count)
print("TLE ×",tle_count)
print("RE ×",re_count)