mark2142 said:
the momentum is again conserved for each pair
No in the case of 3 bodies and more general for n bodies, the momentum is NOT necessarily conserved pairwise. It is conserved as a whole, that is "vector sum of momentum of all bodies before collision=vector sum of momentum of all bodies after collision". The full mathematical proof in the case of n bodies comes from Newton's 2nd and 3rd law and it is more an exercise in indexes and summation than a proof that has really something else to say besides the proof we do for 2 bodies.
I 'll do it for 3 bodies to see what I mean. By ##F_{ij}## I ll mean the force from body i to body j. And ##P_i## the momentum of the body i before collision and ##P'_i## its momentum after collision.
So we will have by Newtons 2nd law for each body (actually from impulse momentum theorem which is an immediate consequence of Newton's 2nd)
$$P'_1=P_1+\int F_{21} dt +\int F_{31} dt$$
$$P'_2=P_2+\int F_{12} dt+\int F_{32} dt$$
$$P'_3=P_3+\int F_{13} dt+\int F_{23} dt$$
By summing all the three equations above we get
$$P'_1+P'_2+P'_3=P_1+P_2+P_3+\int F_{21}dt+\int F_{12}dt+\int F_{31} dt+\int F_{13} dt+\int F_{32} dt+\int F_{23} dt$$
Now from Newton's 3rd Law we have ##F_{ij}=-F_{ji}## so ##F_{21}=-F_{12}##, ##F_{31}=-F_{13}## and ##F_{32}=-F_{23}## so all the integrals are summed out to zero and what is left is $$P_1+P_2+P_3=P'_1+P'_2+P'_3$$.
PS. I should have put the vector sign in Ps ,P's and Fs so for example when i write ##P_1## i should have written ##\vec{P_1}## and for ##F_{12}## , ##\vec{F}_{12}## and so on but I did it that way for Latex convenience.