Fingerprints of Heavy-Element Nucleosynthesis in the Late-Time Lightcurves of Kilonovae.