with the ring nitrogen atom acylated by carboxylic or carbonic acids, or with sulfur or nitrogen analogues thereof