Tailored nanoparticles and wires of Sn, Ge and Pb inside carbon nanotubes