Word stays a word after taking away a letter
This is a repost of this challenge
Challenge
There is an old, popular riddle:
Find an English word with 8 letters that, taken away one letter, creates a new valid word. Repeat that until there are no letters left.
Example solution:
starting
staring
string
sting
sing
sin
in
I
Your task is to write a program, which takes a dictionary and outputs the longest word, that still occurs in the dictionary after repeatedly taking away a letter.
Rules
- All words will be lower case
- If multiple valid words have the same length you can output any one of those
- Default Loopholes apply
- This is code-golf, so the shortest answer wins!
Example
In: [this, hat, hi, is, i, a, at]
Out: this
In: [pings, aid, pin, ad, i, in]
Out: aid