Given string s and a dictionary, return all possible sentences where every word is in the dictionary. Print each sentence on a new line in sorted order.
Example:
Input: catsanddog
cat cats and sand dog
Output: cat sand dog
cats and dogInput format: Line 1 = s, line 2 = space-separated dictionary.