The strategic thinking behind the Mamdani campaign was brilliant.