Multiparticle generalization of entanglement swapping