N=int(input())
AC=0
WA=0
TLE=0
RE=0
for i in range(N):
    c=input()
    if(c=='AC'):
        AC+=1
    elif(c=='WA'):
        WA+=1
    elif(c=='TLE'):
        TLE+=1
    else:
        RE+=1

print("AC ×",AC)
print("WA ×",WA)
print("TLE ×",TLE)
print("RE ×",RE)