n = int(input())
case = ["AC", "WA", "TLE", "RE"]
ac=0;wa=0;tle=0;re=0;
ss = []
for _ in range(n):
        ss.append(input())
for i in ss:
    if i == "AC":
        ac += 1
    elif i == "WA":
        wa += 1
    elif i == "TLE":
        tle += 1
    else:
        re += 1
print(f"{case[0]} × {ac}")
print(f"{case[1]} × {wa}")
print(f"{case[2]} × {tle}")
print(f"{case[3]} × {re}")