The Trade Desk Interview Question

Write code to solve the mastermind game in 12 turns or less.