Two blocks A and B of masses m and 2m, respectively are connected by a spring of force constant k. The masses are moving to the right with uniform velocity v each, the heavier mass leading the lighter one. The spring is in the natural length during this motion. Block B collides head on with a third block C of mass m, at rest, the collision being completely inelastic. Calculate the maximum compression of the spring.