import os

N = int(input())
S = [0] * N

for i in range(0, N):
    S[i] = input()

AC = 0
WA = 0
TLE = 0
RE = 0

for i in S:
    if i == "AC":
        AC+=1
    elif i == "WA":
        WA+=1
    elif i == "TLE":
        TLE+=1
    elif i == "RE":
        RE+=1

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

        