Condensation polymers of aldehydes or ketones with only compounds containing hydrogen attached to nitrogen of aldehydes with heterocyclic compounds