On-Surface Engineering of a Magnetic Organometallic Nanowire.