Aldol condensation in acidic medium
I have drawn a three step mechanism as opposed to the concerted step reaction proposed in the other answer.



This mechanism has the added benefit of not leaving any room for formation of any side products as there is only one source carbon of acidic hydrogens in each compound.