Theoretical study of the formation of C18H and C18H2 molecules by low energy irradiation with atomic and molecular hydrogen