Solves a complicated puzzle