Reconfigurable polymers via supramolecular self-sorting