Do you know how to use generating functions?

If so then the answer is rather easy to find.

If not, then this is a problem of different cases.

The is because you have three sets or repeated letters: {M,M,A,A,T,T}.

So you must consider cases of no reparations, one letter repeated, etc.