Synthesis and properties of thermoplastic polyimides with ether and ketone moieties