Print the index of a word with letters in ascending order -- Microsoft