#B-judge
N = int(input())
list = []

for i in range(N):
    list.append(str(input()))
    AC = int((list.count("AC")))
    WA = int((list.count("WA")))
    TLE = int((list.count("TLE")))
    RE = int((list.count("RE")))

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