{"problem":{"name":"March","description":{"content":"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`,","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc089_c"},"statements":[{"statement_type":"Markdown","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.\n\n## Constraints\n\n*   $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)$\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n$S_1$\n$:$\n$S_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc089_c","tags":[],"sample_group":[["5\nMASHIKE\nRUMOI\nOBIRA\nHABORO\nHOROKANAI","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."],["4\nZZ\nZZZ\nZ\nZZZZZZZZZZ","0\n\nNote that there may be no ways to choose three people so that the given conditions are met."],["5\nCHOKUDAI\nRNG\nMAKOTO\nAOKI\nRINGO","7"]],"created_at":"2026-03-03 11:01:13"}}