Zohran Mamdani thinks five moves ahead, and it shows.