Heterocyclic compounds containing 1,4-diazine or hydrogenated 1,4-diazine rings not condensed with other rings