# Word stays a word after taking away a letter *This is a [repost](https://codegolf.meta.stackexchange.com/questions/24851/repost-word-stays-a-word-after-taking-away-a-letter) of [this](https://codegolf.stackexchange.com/questions/145222/word-stays-a-word-after-taking-away-a-letter-repeat) 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](https://codegolf.meta.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default) apply - This is [tag: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 ``` [tag:code-golf][tag:string][tag:array]