Formation of Military Alliances