Populating the periodic table: Nucleosynthesis of the elements