I have read the answer about the energy and momentum conservation question but I have a great question now! Imagine we have two masses which one of them is at rest and another move and collide to the rest one. Now we know that the momentum remain always constant even if the collision was inelastic but the kinetic energy convert to heat. So in this case the energy converted to heat and radiate to space because of the (heat radiation nature) so we will receive that energy and then as we know the momentum will conserved there and lead that the second mass start to move with the same velocity as the firs mass before collide. Imagine again there were a chain much more masses spaced with same divided far from each other. One mass will collide to the next and radiate heat and the the second mass start to move with the same speed and collide to third mass and radiate heat and then start to move toward the forth mass and .... see? we were receiving heat from naught? While the system lost no velocity amount of energy freed. This is impossible. I have test this problem by MSC ADAMS. ADAMS shows that the masses velocity remain same. So where is the sure of this heat energy?
In the image you will see that the two mass collide together inelastically fore ever because the momentum conserved the system never loss velocity, but we have receive heat from their collision