Mastermind -- python version