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