n = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(0, n):
  if "AC" : AC += 1
  else if "WA" : WA += 1
  else if "TLE" : TLE += 1
  else if "RE" : RE += 1
print("AC x " + str(AC))
print("WA x " + str(WA))
print("TLE x " + str(TLE))
print("RE x " + str(RE))
  