A hydrocarbon A (C4H8) on reaction with HCl gives a compound B (C4H9Cl) which on reaction with 1 mol of NH3 gives compound C (C4H10N). On reacting with NaNO2 and HCl followed by treatment with water, compound C yields an optically active compound D. The D is