@AndyLiu0429 Thank you very much for the posting. I was so confused at the beginning.

And I was actually also confused that, for the first example, ["wrt", "wrf", "er", "ett", "rftt"], how could get the order of 't' and 'f' and why their positions should be after 'r'? Later I figured out that using the first char of all the five words we could get the order of 'w', 'e', and 'r'. Then using "wrt" and "wrf", we could get the order of 't' and 'f' (the order of the 3rd char). Using "er" and "ett", we could get the order of 'r' and 't' (the order of the 2rd char). That is how we could get "wertf".