with formation of cyclic imides of ortho- or peri- dicarboxylic acids