Solve Boat problem in phase 1.