The Genealogy of Cities