Described exhaustive search method for maze.