Let |x| be the number of 1's in x. Let Alice define p(x) to be -1 if the parity of the input bits in her set is 1, and 1 if the parity is 0. Let Bob define q(x) similarly. Let them compute h(x) = 2|x|+p(x)+q(x).