Heterocyclic compounds containing 1,3-diazine or hydrogenated 1,3-diazine rings condensed with carbocyclic rings or ring systems