from collections import Counter
N = int(input())
S = [input() for i in range(N)]
res = Counter(S)
print(f"AC x {res['AC']}")
print(f"AC x {res['WA']}")
print(f"AC x {res['TLE']}")
print(f"AC x {res['RE']}")