Carboxylic amides, alkylolamides or imides or their condensation products with alkylene oxides