Compounds (a) and (g) can form hydrogen bonds between their own molecules. Each of these has hydrogens capable of hydrogen bonding (H’s on nitrogen) and heteroatoms with lone pairs (N in structure (a); N and especially O in structure (g). Compounds (a) and (g) can of course form H bonds with water. Compounds (b), (d) and (f) can form weaker hydrogen bonds with water.