n=int(input())
s=[]
for i in range(n):
    s.append(input())
a=[0]*4
for i in range(n):
    if s[i]=='AC':
        a[0]+=1
    elif s[i]=='WA':
        a[1]+=1
    elif s[i]=='TLE':
        a[2]+=1
    else:
        a[3]+=1
print("AC×{}".format(a[0]))
print("WA×{}".format(a[1]))
print("TLE×{}".format(a[2]))
print("RE×{}".format(a[3]))






    