Choose the correct answer form the alternatives given.
An element X burns in nitrogen to give a compound Y which on reaction with water gives a compound Z and a gas with a pungent smell. Z can be used during construction and whitewashing. When an excess of CO2 is bubbled through Z, a compound P is formed which on heating decomposes to give a colourless, odourless gas. Identify X, Y, Z, and P.