  We generalize the entanglement swapping scheme originally proposed for two
pairs of qubits to an arbitrary number $q$ of systems composed from an
arbitrary number $m_j$ of qudits. Each of the system is supposed to be prepared
in a maximally entangled state of $m_j$ qudits, while different systems are not
correlated at all. We show that when a set $\sum_{j=1}^q a_j$ particles (from
each of the $q$ systems $a_j$ particles are measured) are subjected to a
generalized Bell-type measurement, the resulting set of $\sum_{j=1}^q
(m_j-a_j)$ particles will collapse into a maximally entangled state.
