case = input()
AC = 0
WA = 0
TLE = 0
RE = 0
others = 0
for i in range(len(case)):
    
  if case[i] == "AC":
    AC += 1
      
  elif case[i] == "WA":
    WA += 1
      
  elif case[i] == "TLE":
    TLE += 1
      
  elif case[i] == "RE":
    RE += 1
      
  else :
    others += 1
      
print("AC"+" x "+str(AC))
print("WA"+" x "+str(WA))
print("TLE"+" x "+str(TLE))
print("RE"+" x "+str(RE))