On heating an orange solid X gives a green solid Y and a colourless gas Z. The gas Z reacts with Mg to give a white solid that reacts with water to give a slimy basic solid. The orange solid is:
Potassium chromate
Potassium dichromate
Sodium Dichromate
Ammonium Dichromate
On heating, potassium dichromate decomposes to form potassium chromate, chromic oxide and oxygen