#As long as the final symbol of ''x'' is the last symbol in the sorted ordering of the alphabet, remove it, producing a shorter word.
#Replace the final remaining symbol of ''x'' by its successor in the sorted ordering of the alphabet.