N = int(input())
S = ["AC", "WA", "TLE", "RE"]
C1 = 0
C2 = 0
C3 = 0
C4 = 0

for i in range(N):
    if S = "AC":
        C1 += 1
    elif S = "WA":
        C2 += 1
    elif S = "TLE":
        C3 += 1
    elif S = "RE":
        C4 += 1

print("AC x "+"%d"%(C1))      
print("WA x "+"%d"%(C2))      
print("TLE x "+"%d"%(C3))      
print("RE x "+"%d"%(C4))      