n = int(input())
c0, c1, c2, c3 = 0
for _ in range(n):
    if _ == "AC":
        c0 += 1
    if _ == "WA":
        c1 += 1
    if _ == "TLE":
        c2 += 1
    if _ == "RE":
        c3 += 1
print("AC x", c0)
print("WA x", c1)
print("TLE x", c2)
print("RE x", c3)