Molecular engineering to control the magnetic interaction between single-chain magnets assembled in a two-dimensional network.