Heterocyclic compounds containing polymethylene-imine rings with at least five ring members, 3-azabicyclo [3.2.2.] nonane, piperazine, morpholine or thiomorpholine rings, having only hydrogen atoms directly attached to the ring carbon atoms acylated on ring nitrogen atoms by radicals derived from carboxylic acids, or sulfur or nitrogen analogues thereof