You have some weird language which has some alphabet, but since the alphabet is hard, we will work with latin transcription. Given an alphabet (sequence of letter combination, each describes a letter of the original alphabet transcripted to Latin) and the list of words. We also consider all words are written correctly and it's right to pick every letter combination greedy (the longest combination is prefered). We have to sort our list in alphabet order.
For example:
If the alphabet is {"b", "bc", "aa", "c"} and the list is {"aab", "baa", "bcb", "bbc"}, then the sorted list will be { "bbc", "baa", "bcb", "aab"}