Generalized three-sided assignment markets : core and competitive prices ∗