N=int(input())
S=[str(input()) for i in range(N)]

AC=S.count("AC")
WA=S.count("WA")
TLE=S.count("TLE")
RE=S.count("RE")

print(f"AC × {AC}")
print(f"WA × {WA}")
print(f"TLE × {TLE}")
print(f"RE × {RE}")