Cart A collides elastically with identical cart B on a frictionless track. Immediately afterward, cart B collides perfectly inelastically with cart C, and the three-cart system is isolated from external forces. Describe what happens to the total kinetic energy of the system (i) after the first collision and (ii) after the second collision.