  Isotopic abundances in comets are key to understanding the history and origin
of material in the Solar System. Deuterium-to-hydrogen (D/H) ratios in water
are available for several comets. However, no long-term studies of the D/H
ratio in water of a comet during its passage around the Sun have been reported.
Linear alkanes are important organic molecules, which have been found on
several Solar System bodies, including comets. To date, only upper limits of
isotopic ratios for D/H and 13C/12C in linear alkanes are available.
  The aim of this work is a detailed analysis of the D/H ratio in water during
the whole Rosetta mission. In addition, a first determination of the D/H and
13C/12C ratios in the first four linear alkanes in the coma of
67P/Churyumov-Gerasimenko is provided. We analysed in situ measurements from
the Rosetta/ROSINA Double Focusing Mass Spectrometer (DFMS).
  The D/H ratio from HDO/H2O and the 16O/17O ratio from H216O/H217O did not
change during 67P's passage around the Sun between 2014 and 2016. All D/H ratio
measurements were compatible, within 1$\sigma$, with the mean value of
$5.01\times10^{-4}$ and its relative variation of 2.0%. This suggests that the
D/H ratio in 67P's coma is independent of heliocentric distance, level of
cometary activity, as well as spacecraft location with respect to the nucleus.
Additionally, the 16O/17O ratio could be determined with a higher accuracy than
previously possible, yielding a value of 2347 with a relative variation of
2.3%. For the alkanes, the D/H ratio is between 4.1 and 4.8 times higher than
in H2O, while the 13C/12C ratio is compatible, within uncertainties, with data
for other Solar System objects. The relatively high D/H ratio in alkanes is in
line with other cometary organic molecules and suggests that these organics may
be inherited from the presolar molecular cloud from which the Solar System
formed.
