There are $360$ permutations of the letters in $MMATHS$. When ordered alphabetically, starting from $AHMMST$, $MMATHS$ is in the $n$th permutation. What is $n$?

Let's think step by step and output the final answer within \boxed{}.
user