Google interview question

Create a program to solve the “password” game