output_description: Print the number of Takahashi's correct answers and the number of Takahashi's
  penalties.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N M
      p_1 S_1
      :
      p_M S_M
attempt: params = list(map(int, input().split()))
  fails = [0] * params[0]
  suceeds = [False] * params[0]
  for _ in range(params[1]):
      result = input().split()
      index = int(result[0]) - 1
      if result[1] == "AC":
          suceeds[index] = True
          if sum(suceeds) == params[0]:
              break
      elif suceeds[index] is False:
          fails[index] += 1
  print(str(sum(suceeds)) + " " + str(sum(fails)))
  
problem_description: Statement
  
  Takahashi participated in a contest on AtCoder.
  
  The contest had N problems.
  
  Takahashi made M submissions during the contest.
  
  The i-th submission was made for the p_i-th problem and received the verdict
  S_i (`AC` or `WA`).
  
  The number of Takahashi's correct answers is the number of problems on which
  he received an `AC` once or more.
  
  The number of Takahashi's penalties is the sum of the following count for the
  problems on which he received an `AC` once or more: the number of `WA`s
  received before receiving an `AC` for the first time on that problem.
  
  Find the numbers of Takahashi's correct answers and penalties.
samples: [{"input": "2 5\n    1 WA\n    1 AC\n    2 WA\n    2 AC\n    2 WA", "output": "2 2\n    \n\nIn his second submission, he received an `AC` on the first problem for the\nfirst time. Before this, he received one `WA` on this problem.\n\nIn his fourth submission, he received an `AC` on the second problem for the\nfirst time. Before this, he received one `WA` on this problem.\n\nThus, he has two correct answers and two penalties.\n\n* * *"}, {"input": "100000 3\n    7777 AC\n    7777 AC\n    7777 AC", "output": "1 0\n    \n\nNote that it is pointless to get an `AC` more than once on the same problem.\n\n* * *"}, {"input": "6 0", "output": "0 0"}]