Try all possible orderings of the characters that appear in the words. Check which is consistent with the sorted order.
With 26 possible characters, that's up to 26! orderings to check.
Can you extract the ordering constraints directly from adjacent word pairs?