Alphabets present in the word SECRET are S,E,E,C,R,T,
Order of the letters according to the alphabet is C,E,E,R,S,T
Number of words starting with C (C _ _ _ _ _) is =5!2!=60 (as here we have two E)
Number of words starting with E (E _ _ _ _ _) =5!=120 (as here we have single E)
Number of words starting with R (R _ _ _ _ _) =5!2!=60 (as here we have two E)
Number of words starting with SC (SC _ _ _ _) =4!2!=12 (as here we have two E)
Number of words starting with SECE (SECE _ _) =2!=2
Next word is "SECRET".
Therefore, rank
=60+120+60+12+2+1=255