As the war in Ukraine drags on, new alliances are reshaping the global balance of power.