Solution to Mars Rover Problem