Given a list of strings words, find the shortest string that contains every string in words as a substring. If there are multiple shortest superstrings, return the lexicographically smallest one. You may reorder and overlap the input strings arbitrarily to form the superstring. Implement solve(words: list[str]) -> str. Notes: - If a word from words is a substring of another word, it can be omitted from explicit placement (it is considered already covered). - Words may repeat in the input; repeated identical words only need to appear once in the final superstring, but treat distinct identical entries as covered by a single occurrence. This is a hard problem; an optimal solution uses overlap computation and dynamic programming over subsets (bitmask DP). Your implementation must return the exact shortest superstring; if there are ties by length, return the lexicographically smallest among them.
(["catg","ctaagt","gcta","ttca","atgcatc"],)"gctaagttcatgcatc"