Successive modification of polydentate complexes gives access to planar carbon- and nitrogen-based ligands