Permuting Mathematch
Combinatorics · 2025 Mathematch, Written Round | proposed by @lumiere
Let $m$ be the number of ways that the letters of the codeword MATHEMATCH be arranged such that no consecutive letters are the same. Determine the remainder when $m$ is divided by 1000.