N = int(input())
List = ['AC', 'WA', 'TLE', 'RE']
List2 = []
for _ in range(N):
    S = input()
    List2.append(S)
result = dict((i, List2.count(i)) for i in List)
Set = set(List) - set(List2)
for key, value in result.items():
    print(key, "x", value)
for k in Set:
    print(k +"x 0")
