Please solve the programming task below using a self-contained code snippet in a markdown code block.

Given an array of strings words, find the longest string in words such that every prefix of it is also in words.

For example, let words = ["a", "app", "ap"]. The string "app" has prefixes "ap" and "a", all of which are in words.

Return the string described above. If there is more than one string with the same length, return the lexicographically smallest one, and if no string exists, return "".
 
Please complete the following python code precisely:
```python
class Solution:
    def longestWord(self, words: List[str]) -> str:
```