Ship with three masts