We have letters L, O, G, A, R, I, T, H, M.
Words contain exactly three different letters.
Three letters can be selected in `.^(9)C_(3)` ways.
Now we have following cases for the occurrence of these three letters.
Case I : Occurrence of letters is 4,1,1
The letter which is occurring four times can be selected in `.^(3)C_(1)` ways.
Then letters can be arranged in `(6!)/(4!)` ways.
So, number of words in this case are `.^(3)C_(1)xx(6!)/(4!)=90`
Case II : Occurrence of letters is 3,2,1
The letter which is occurring three times can be selected in `.^(3)C_(1)` ways.
The letter which is occurring two times can be selected in `.^(2)C_(1)` ways.
Then letters can be arranged in `(6!)/(3!2!)` ways.
So, number of words in this case are `.^(3)C_(1)xx .^(2)C_(1)xx(6!)/(3!2!)=360`
Case III : Occurrence of letters is 2,2,2
Since each letters is occurring twice, number of words are `(6!)/(2!2!2!)=90`
So, total number of words `=.^(9)C_(3)xx(90+360+90)`
`=84xx540`
=45360