Polyamides containing atoms other than carbon, hydrogen, oxygen, and nitrogen