When a metal X is treated with cold water, it gives a basic salt Y with molecular formula XOH (Molecular mass = 40) and liberates a gas Z which easily catches fire. Identify X, Y and Z and also write the reaction involved.