Macromolecular compounds containing atoms other than carbon in the main chain of the macromolecule {derived from five- or six-membered heterocyclic compounds, other than imides derived from five-membered heterocyclic compounds}