{"raw_statement":[{"iden":"problem statement","content":"There are $N$ people. The name of the $i$\\-th person is $S_i$.\nWe would like to choose three people so that the following conditions are met:\n\n*   The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`.\n*   There are no multiple people whose names begin with the same letter.\n\nHow many such ways are there to choose three people, disregarding order?\nNote that the answer may not fit into a $32$\\-bit integer type."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 10^5$\n*   $S_i$ consists of uppercase English letters.\n*   $1 \\leq |S_i| \\leq 10$\n*   $S_i \\neq S_j (i \\neq j)$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$S_1$\n$:$\n$S_N$"},{"iden":"sample input 1","content":"5\nMASHIKE\nRUMOI\nOBIRA\nHABORO\nHOROKANAI"},{"iden":"sample output 1","content":"2\n\nWe can choose three people with the following names:\n\n*   `MASHIKE`, `RUMOI`, `HABORO`\n    \n*   `MASHIKE`, `RUMOI`, `HOROKANAI`\n    \n\nThus, we have two ways."},{"iden":"sample input 2","content":"4\nZZ\nZZZ\nZ\nZZZZZZZZZZ"},{"iden":"sample output 2","content":"0\n\nNote that there may be no ways to choose three people so that the given conditions are met."},{"iden":"sample input 3","content":"5\nCHOKUDAI\nRNG\nMAKOTO\nAOKI\nRINGO"},{"iden":"sample output 3","content":"7"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}