There are 6 letters A, E, I, M, N, R.
Number of words that can be formed by using
all these letters = 6! = 720
When a word starts with ‘A’,
‘A’ can be arranged in 1 way and the remaining 5 letters can be arranged among themselves in 5! ways.
The number of words starting with A = 5!
∴ Similarly,
The number of words starting with E = 5!
The number of words starting with I = 5!
The number of words starting with M = 5!
The number of words starting with N = 5!
The number of words starting with R = 5!
Total number of words = 6 × 5! = 720
Number of words starting with AE = 4! = 24
Number of words starting with AIE = 3! = 6
Number of words starting with AIM = 3! = 6
Number of words starting with AINE = 2!
Total words = 24 + 6 + 6 + 2 = 38
39th word is AINMER
40th word is AINMRE