Turing Mastermind exercise