Design a game of Hangman with two parts. Part 1 – Build a simple console Hangman engine. A secret word is chosen (all lowercase a–z). The player repeatedly guesses single lowercase letters. After every guess the game prints the current pattern (correctly guessed letters shown, unknowns as underscores) and a list of all distinct letters guessed so far. If the guessed letter has been tried before the game returns the exact string "INVALID" and does not change state. Otherwise the letter is recorded: every occurrence in the word is revealed; if the letter is not in the word it counts as a miss. The player wins as soon as the whole word is revealed. The player loses after six distinct incorrect letters. The engine must expose a method guess(letter) that returns one of the strings "INVALID", "WIN", "LOSE", or "CONTINUE" and updates internal state accordingly. Part 2 – Adaptive picker. Assume the picker (the side choosing the secret word) is adversarial and may change the word during play as long as the new word is consistent with every previous pattern and misses. Implement a picker strategy that always keeps at least one valid word remaining and tries to maximize the number of guesses the player needs. You may assume a provided dictionary of lowercase English words.