Synthesis of poly(pyridine-imide)s and their electronic memory performances