Solve maze.