N = int(input())
S = [input() for _ in range(N)] #N行に1文字入力したい
A = S.count("AC")
B = S.count("WA")
C = S.count("TLE")
D = S.count("RE")
print("AC", "×", str(A))
print("WA", "×", str(B))
print("TLE", "×", str(C))
print("RE", "×", str(D))
