Prove that the segment connecting the midpoints of the non-parallel sides of a trapezoid is parallel to its bases.