An orange solid (A) on heating gave a green residue (B), a colourless gas (C ) and water vapours. The dry gas (C ) when passed over heated magnesium, gave a white solid (D) which evolved a gas (E ) on reacting with water. The gas formed dense white fumes with HCl. Identify all the compounds from A to E. Give the reactions involved.
The white solid (D) is :
A. MgO
B. `MgSO_(4)`
C. `MgCl_(2)`
D. `Mg_(2)N_(3)`