output_description: Let C_0, C_1, C_2, and C_3 be the numbers of test cases for which the verdict
  is `AC`, `WA`, `TLE`, and `RE`, respectively. Print the following:
  
      
      
      AC x C_0
      WA x C_1
      TLE x C_2
      RE x C_3
      
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      S_1
      \vdots
      S_N
attempt: #!/usr/bin/env python
  # pyrival orz
  import os
  import sys
  from io import BytesIO, IOBase
  
  """
      for _ in range(int(input())):
      n,m=map(int,input().split())
      n=int(input())
      a = [int(x) for x in input().split()]
  """
  
  
  def main():
      from collections import defaultdict
  
      ans = defaultdict(int)
      for _ in range(int(input())):
          ans[input()] += 1
      print("AC X " + str(ans["AC"]))
      print("WA X " + str(ans["WA"]))
      print("TLE X " + str(ans["TLE"]))
      print("RE X " + str(ans["RE"]))
  
  
  # region fastio
  
  BUFSIZE = 8192
  
  
  class FastIO(IOBase):
      newlines = 0
  
      def __init__(self, file):
          self._fd = file.fileno()
          self.buffer = BytesIO()
          self.writable = "x" in file.mode or "r" not in file.mode
          self.write = self.buffer.write if self.writable else None
  
      def read(self):
          while True:
              b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
              if not b:
                  break
              ptr = self.buffer.tell()
              self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
          self.newlines = 0
          return self.buffer.read()
  
      def readline(self):
          while self.newlines == 0:
              b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
              self.newlines = b.count(b"\n") + (not b)
              ptr = self.buffer.tell()
              self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
          self.newlines -= 1
          return self.buffer.readline()
  
      def flush(self):
          if self.writable:
              os.write(self._fd, self.buffer.getvalue())
              self.buffer.truncate(0), self.buffer.seek(0)
  
  
  class IOWrapper(IOBase):
      def __init__(self, file):
          self.buffer = FastIO(file)
          self.flush = self.buffer.flush
          self.writable = self.buffer.writable
          self.write = lambda s: self.buffer.write(s.encode("ascii"))
          self.read = lambda: self.buffer.read().decode("ascii")
          self.readline = lambda: self.buffer.readline().decode("ascii")
  
  
  sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
  input = lambda: sys.stdin.readline().rstrip("\r\n")
  
  # endregion
  
  if __name__ == "__main__":
      main()
  
problem_description: Statement
  
  Takahashi is participating in a programming contest called AXC002, and he has
  just submitted his code to Problem A.
  
  The problem has N test cases.
  
  For each test case i (1\leq i \leq N), you are given a string S_i representing
  the verdict for that test case. Find the numbers of test cases for which the
  verdict is `AC`, `WA`, `TLE`, and `RE`, respectively.
  
  See the Output section for the output format.
samples: [{"input": "6\n    AC\n    TLE\n    AC\n    AC\n    WA\n    TLE", "output": "AC x 3\n    WA x 1\n    TLE x 2\n    RE x 0\n    \n\nWe have 3, 1, 2, and 0 test case(s) for which the verdict is `AC`, `WA`,\n`TLE`, and `RE`, respectively.\n\n* * *"}, {"input": "10\n    AC\n    AC\n    AC\n    AC\n    AC\n    AC\n    AC\n    AC\n    AC\n    AC", "output": "AC x 10\n    WA x 0\n    TLE x 0\n    RE x 0"}]