Relative hydrogen-bonding affinities of imides and lactams