Algorithm to solve OneTDraw puzzles.