Tautomerization-mediated molecular switching between six- and seven-membered rings stabilized by hydrogen bonding.