output_description: If there are x ways to choose three people so that the given conditions are
  met, print x.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      S_1
      :
      S_N
attempt: n = int(input().strip())
  s = [input().strip() for _ in range(n)]
  num = [0 for _ in range(5)]
  num[0] = len([True for _s in s if _s[0] == "M"])
  num[1] = len([True for _s in s if _s[0] == "A"])
  num[2] = len([True for _s in s if _s[0] == "R"])
  num[3] = len([True for _s in s if _s[0] == "C"])
  num[4] = len([True for _s in s if _s[0] == "H"])
  ans = 0
  for i in range(5):
      for j in range(i, 5):
          for k in range(j, 5):
              ans += num[i] * num[j] * num[k]
  print(ans
problem_description: Statement
  
  There are N people. The name of the i-th person is S_i.
  
  We would like to choose three people so that the following conditions are met:
  
    * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`.
    * There are no multiple people whose names begin with the same letter.
  
  How many such ways are there to choose three people, disregarding order?
  
  Note that the answer may not fit into a 32-bit integer type.
samples: [{"input": "5\n    MASHIKE\n    RUMOI\n    OBIRA\n    HABORO\n    HOROKANAI", "output": "2\n    \n\nWe can choose three people with the following names:\n\n  * `MASHIKE`, `RUMOI`, `HABORO`\n\n  * `MASHIKE`, `RUMOI`, `HOROKANAI`\n\nThus, we have two ways.\n\n* * *"}, {"input": "4\n    ZZ\n    ZZZ\n    Z\n    ZZZZZZZZZZ", "output": "0\n    \n\nNote that there may be no ways to choose three people so that the given\nconditions are met.\n\n* * *"}, {"input": "5\n    CHOKUDAI\n    RNG\n    MAKOTO\n    AOKI\n    RINGO", "output": "7"}]