The roles of H and O atoms in diamond growth