A 500 mL glass flask is filled at 298 K and 1 atm, pressure with three diatomic gases X, Y and Z. The initial volume ratio of the gases before mixing was 5:3:1. The density of the heaviest gas in the mixture is not more than 25 times that of the lightest gas. When the mixture was heated, vigorous reactions take place between X and Y and X and Z in which all the three gases were completely used up. The gases X, Y, Z respectively are (A) H2, O2, N2 (B) H2, O2, Cl2 (C) H2, F2, O2 (D) O2, H2, F2