Orthogonal insertion of lanthanide and transition-metal atoms in metal-organic networks on surfaces