Ring formation in aromatic polyamidoacids to polyimides. Effect of the structure of the diamine component on kinetics of ring formation