26 alphabets?. 0 to 9??. Not sure what you mean, but you said you KNEW the WORDS, in which case it is a simple permutation. Where do letters and numbers and alphabets come into it?. It makes no difference if a word is repeated or no, just count it as 2 words and the problem is the same.
Either you are overcomplicating it now, or you under-complicated it when you explained the problem.
A B C
A C B
B A C
B C A
C A B
C B A
B = C = A ?. So what, it's the same problem. Just ignore the similarity.