When a substance A reacts with water it produces a combustible gas B and a solution of substance C in water. When another substance D reacts with this solution of C, it also produces the same gas B on warming but D can produce gas B on reaction with dilute sulphuric acid at room temperature. A imparts a deep golden yellow colour to a smokeless flame of bunsen burner A, B, C and D respectively are: