How Imperial Cities Rose Through War and Alliances