n=int(input())

judge_list=[]
for i in range(n):
    a=input()
    judge_list.append(a)
    
ac=judge_list.count('AC')
ac=str(ac)
wa=judge_list.count('WA')
wa=str(wa)
tle=judge_list.count('TLE')
tle=str(tle)
re=judge_list.count('RE')
re=str(re)

print("AC × "+ac)
print("WA × "+wa)
print("TLE × "+tle)
print("RE × "+re)

