Using Knuth's algorithm to solve the game in 5 steps