Write equations for the reaction of each of the following

Write equations for the reaction of each of the following with (1) Mg in ether followed by (2) addition of D2O to the resulting solution:
a. CH3CH2CH2CH2I
b. CH3CH2OCH2CH2Br
c. C6H5CH2Br
d. Allyl bromide