Hydrogen-bonding dynamics in aqueous solutions of amides and acids: monomer, dimer, trimer, and polymer.