Token Vault Probe
A vault holds a secret token chosen from wordlist. Every token has the same length. You interact with a Master object that exposes one method:
guess(word): returns the number of positions wherewordmatches the secret token exactly.
You may call guess at most 10 times. Your task is to identify the secret and return the ordered sequence of words you guessed. The sequence must end with the secret token and must contain at most 10 entries. Every guessed word must come from wordlist.
Because the platform adapter passes wordlist and secret directly, the solution simulates the Master internally: it knows the secret, but it must still respect the 10-guess budget and the rule that each guess is a word from wordlist.
A deterministic minimax strategy guarantees success within the budget. At each step let candidates be the tokens still possible. For every candidate w in candidates, partition candidates by the match count matches(w, c); the worst case for w is the largest partition. Guess the w with the smallest worst case, breaking ties by lexicographically smallest token. After the reply, keep only candidates with the same match count. Stop when the guess matches the secret in all positions.
Token Vault Probe
A vault holds a secret token chosen from `wordlist`. Every token has the same length. You interact with a Master object that exposes one method: