n=int(input())
list=[input() for i in range(n)]
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(0,n):
    if list[i] == 'AC':
        AC = AC + 1
    if list[i] == 'WA':
        WA = WA + 1
    if list[i] == 'TLE':
        TLE = TLE + 1
    if list[i] == 'RE':
        RE = RE + 1
print("AC × " + str(AC))
print("WA × " + str(WA))
print("TLE × " + str(TLE))
print("RE × " + str(RE))