with the ring nitrogen atoms and the oxygen or sulfur atoms separated by carbocyclic rings or by carbon chains interrupted by carbocyclic rings