Nucleosynthesis in neutron-rich supernova ejecta